Skip to content

Refreshing token requires a call to logout and login (a second time) to get a new token #25

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

Open
dwulive opened this issue Feb 5, 2018 · 2 comments

Comments

@dwulive
Copy link

dwulive commented Feb 5, 2018

I am not sure how this is handled with google, but here is our scenario:
Login
Get token, check with server to see if user is registered
If not
logout :(
login with forceRefreshToken set to true
Get a new token and use this to register a new user on the server

This all works, but the user has to select their gmail account twice, is there a way to get a new token without calling signout or signin a second time?

@asneya
Copy link

asneya commented Feb 22, 2018

We have observed exactly the same behavior in our game. The first time a user tries to sing in, we are getting an unmapped error 400. Looking deeper into the iOS native code (GoogleSignin.mm, line 90), we've seen that the NSError has the following json inside the userInfo structure:

{
    error = "invalid_grant";
    "error_description" = "Code was already redeemed.";
}

The second time he tries to sign in, there isn't any problem, but this is an annoying behavior.

Has anybody found a fix for this?

Thank you!

@asneya
Copy link

asneya commented Mar 1, 2018

Hi @claywilkinson, could you check this issue, please?

Thanks

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