accounts.register returning isRegistered: true when "finalizeRegistration": false in Android alone

97 views Asked by At

I hope someone can please help with this as I do not seem able to figure out on my own.

Here is our gigyaSdkConfiguration.json:

{
  "apiKey": "API_KEY_HERE",
  "apiDomain": "eu1.gigya.com",
  "accountCacheTime": 60,
  "account": {
    "cacheTime": 1,
    "include": [
      "data",
      "profile",
      "emails"
    ],
    "extraProfileFields": [
      "locale",
      "phones"
    ]
  },
  "sessionVerificationInterval": 0
}

We are moving from a single step registration to a three steps one.

What we currently have is this:

await _gigya.register(
  options.email,
  options.password,
  params: {
    "profile": ...,
    "data": ...data,
    "preferences": ...preferences,
    "subscriptions": ...subscriptions,
    "finalizeRegistration": true,
  });

moving on to:

final Map<String, dynamic>? initRegistrationResponse = await 

_gigya.send("accounts.initRegistration",{});
await _gigya.register(
  options.email,
  options.password,
  params: {
    "profile": ...,
    "data": ...data,
    "preferences": ...preferences,
    "subscriptions": ...subscriptions,
    "finalizeRegistration": false,
    "regToken": initRegistrationResponse?['regToken'].toString(),
  });

which works correctly on iOs, as it returns something like:

{
  "errorCode": 206001,
  "errorMessage": "Account Pending Registration",
  "statusCode": 206,
  "statusReason": "Partial Content"
}

For some reason the same flow in Android will return a success such as:

{
  errorCode: 0,
  apiVersion: 2,
  statusCode: 200,
  statusReason: OK,
  isActive: true,
  isRegistered: true,
  isVerified: false
}

the expected response should be the same as the one from iOs, so as to be able to then call accounts.finalizeRegistration and effectively change the value of "isRegistered" to true.

Any idea why this is happening?

The sdk is correctly configured, I am currently using ^0.2.1, but have also tested several previous ones, and we have been using a dozen other endpoints for months without a single issue.

0

There are 0 answers