Google Sign In Failed After Frequent Signing In And Out
I can sign in my app with Google account at first several times. Everything is fine. But if I sign in and out about 20 times in a one or two minutes. Google sign in failed and in o
Solution 1:
Finally I found the reason. My apk was signed again by our company's release procedure. The procedure used another keystore so my sha1 key was changed. I configure the new sha1 key in google develop console, this bug is solved.
But I'm still confused that, if I use the debug keystore apk, got sign in successfully and uninstall it, then I install the google play apk which has different sha1 key, google sign in can work some times.It won't tell me wrong immediately.
Solution 2:
Try the solution in this SO question, by changing your code and using this code
mGso = newGoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
.requestIdToken(AuthenticatedActivity.this.getResources()
.getString(R.string.server_client_id))
.requestEmail()
.build();
For more information, check this another SO question if it can help you.
Post a Comment for "Google Sign In Failed After Frequent Signing In And Out"