You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I have found this issue on iOS: after the first SignIn call, where I correctly retrieve the AuthCode after task completion, other calls to SignIn (or SignInSilently) always return empty string for task.Result.AuthCode
@mckoupel sadly it seems correct for Google policy on iOS.
I solved by getting AccessToken after the first AuthCode and use that for login with server. I don't know if this could help you.
And one more question. Is any way to reset authcode? After sign out I still have empty string in authcode. Sometimes authode not empty but I can't understand dependence. Maybe authcode lifecycle don't depend on sign out...Or something else wrong
Also having this issue. I thought ForceTokenRefresh = true could solve the issue as it looks like that would force consent, but it's not looking like it's working.
Activity
mckoupel commentedon Oct 26, 2018
The same problem for me. Any ideas?
I'm trying to get access token using auth code but auth code is empty(
alexmaroldi commentedon Oct 26, 2018
@mckoupel sadly it seems correct for Google policy on iOS.
I solved by getting AccessToken after the first AuthCode and use that for login with server. I don't know if this could help you.
mckoupel commentedon Oct 26, 2018
Ok.
How you get access token using AuthCode? If I use something like this
I always have 401 unauthorized...
Maybe something wrong with authcode lifetime?
mckoupel commentedon Oct 26, 2018
And one more question. Is any way to reset authcode? After sign out I still have empty string in authcode. Sometimes authode not empty but I can't understand dependence. Maybe authcode lifecycle don't depend on sign out...Or something else wrong
novavision commentedon Dec 14, 2018
Same here.. only 1st time I get AuthCode, and all other sign in attempts return empty field. Tried to remove app and reinstall - all the same.
thsbrown commentedon Aug 6, 2019
Also having this issue. I thought
ForceTokenRefresh = true
could solve the issue as it looks like that would force consent, but it's not looking like it's working.thsbrown commentedon Aug 6, 2019
This stackoverflow post seems to be relevant here https://stackoverflow.com/questions/42434887/google-sign-in-server-auth-code-nil-ios