Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Social Login: Apple missing errorDetails #20

Open
SarahSteininger opened this issue Apr 20, 2021 · 20 comments
Open

Social Login: Apple missing errorDetails #20

SarahSteininger opened this issue Apr 20, 2021 · 20 comments

Comments

@SarahSteininger
Copy link

SarahSteininger commented Apr 20, 2021

If I use gigya.login with Apple as a provider, the response I receive in onPending does not include the missing required fields for registration.
gigya.login(GigyaDefinitions.Providers.APPLE ...)

Social Sign In with Apple:
{"errorCode":206001,"errorMessage":"Account Pending Registration","regToken":"....."}

Social Sign in with Google (expected response containing missing fields):
{ "callId": "...", "errorCode": 206001, "errorDetails": "Missing required fields for registration: country, preferences...", "errorMessage": "Account Pending Registration", "apiVersion": 2, "statusCode": 206, "statusReason": "Partial Content", "time": "2021-04-08T09:06:05.148Z", "newUser": false, "accountInfo": “ ...

@SarahSteininger SarahSteininger changed the title Social Login: Apple missing errorDetails Social Login: Apple missing errorDetails, Apr 20, 2021
@SarahSteininger SarahSteininger changed the title Social Login: Apple missing errorDetails, Social Login: Apple missing errorDetails Apr 20, 2021
@tal-mi
Copy link
Member

tal-mi commented Apr 20, 2021

Hi,

Can you please provide a callID for that error?

@SarahSteininger
Copy link
Author

Unfortunately there is no callId in the response when I try to login with apple as a provider. Below you find the whole response I get.
{"errorCode":206001,"errorMessage":"Account Pending Registration","regToken":"....."}

@tal-mi
Copy link
Member

tal-mi commented Apr 20, 2021

Do you have a network capture?

@SarahSteininger
Copy link
Author

Network profiling data is unavailable.
Screenshot 2021-04-20 at 14 43 53

@tal-mi
Copy link
Member

tal-mi commented Apr 20, 2021

Network capture as in .har file? Using Filddler or Charles.
I will investigate this further.
Thanks.

Tal.

@SarahSteininger
Copy link
Author

SarahSteininger commented Apr 20, 2021

Thanks.
Moreover I would like to pass the missing consent upon social login as we do ask for the consent before calling login.
It seems that the consent I pass is completely ignored as the consent is still part of the missing fields in onPending.

gigya.login(
socialProvider, consent,
object : GigyaLoginCallback() { .....

callId: 32217a6ef142423e92beddeb6193d3aa

@tal-mi
Copy link
Member

tal-mi commented Apr 21, 2021

Are u utilizing the "onPendingRegistration" callback to resolve it?
If you are looking to resolve your login flow given a missing fields error, we have provided this callback just for that.
The callback will return a IPendingRegistrationResolver class which can be used to call setAccount with the missing fields required for the process to end successfully.

To make sure you are receiving the missing fields make sure you add "missing-required-fields" to your "include" parameter.
Or use the account config feature.

@SarahSteininger
Copy link
Author

I know how to handle missing fields in onPending, however my question is why does passing the consent as a parameter of the login call not work.

When I call register, I can pass the consent in params.
Screenshot 2021-04-21 at 09 59 54

If I try the same when I call login with social provider, the consent I pass as a parameter is ignored.
Screenshot 2021-04-21 at 10 00 21

@tal-mi
Copy link
Member

tal-mi commented Apr 21, 2021

What kind of "consent" parameters are you passing through?

@SarahSteininger
Copy link
Author

Terms of Service and other consent statements.
I wrap them inside a preferences map (for example: terms.myTerms.basic.isConsentGranted).

@tal-mi
Copy link
Member

tal-mi commented Apr 21, 2021

Thank you. Ill investigate the issue and update as soon as I can.

Tal

@tal-mi
Copy link
Member

tal-mi commented Apr 22, 2021

Hi,

The reason consent is not applied when using social login is because it is not supported via that specific endpoint.
It is recommended that you do it using setAccountInfo with the "regToken" you receive.
I will raise this issue with our backend team.

@SarahSteininger
Copy link
Author

Thanks!
Actually what is expected to be passed when using social login? Without the consent I have nothing to pass, but passing an empty map is not supported (however this is possible in the swift SDK: gigya.login(with: provider, viewController: viewController) ...).

java.lang.UnsupportedOperationException: Operation is not supported for read-only collection
at kotlin.collections.EmptyMap.put(Unknown Source:4)
at com.gigya.android.sdk.api.BusinessApiService.login(BusinessApiService.java:206)
at com.gigya.android.sdk.Gigya.login(Gigya.java:388)

@tal-mi
Copy link
Member

tal-mi commented Apr 22, 2021

Social login requires the provider. Additional params may include "lang". Consent params are not supported.

Passing empty map to Gigya.login call is not supported cause you require to pass credentials in order to log in.

Tal.

@SarahSteininger
Copy link
Author

Hi Tal,
Did you have any luck on figuring out why we get the error message without the missing fields?
I guess this issue is related to the non native webview logins as we are experiencing the same problem for iOS sign in on iOS < 12.

@tal-mi
Copy link
Member

tal-mi commented Apr 26, 2021

Are you providing "missing-required-fields" include parameter?

@SarahSteininger
Copy link
Author

Yes, made no difference.

@tal-mi
Copy link
Member

tal-mi commented Apr 26, 2021

I will take this with our backend team and provide an update when available.

@SarahSteininger
Copy link
Author

Thanks!

@tal-mi
Copy link
Member

tal-mi commented Jul 1, 2021

The issue has been moved to our backend team pipeline.
Will continue to update as it progresses into a resolution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants