identity-samples icon indicating copy to clipboard operation
identity-samples copied to clipboard

Error with signin with google

Open carvalho2707 opened this issue 1 year ago • 7 comments

When trying a very basic sample with credential manager to login with google button I'm getting :

androidx.credentials.exceptions.GetCredentialCancellationException: [16] Account reauth failed

carvalho2707 avatar Jul 13 '24 14:07 carvalho2707

I met the same problem. Have you fixed that?

xxxape avatar Jul 25 '24 08:07 xxxape

Unfortunately no, but if you find something let us know

carvalho2707 avatar Jul 25 '24 11:07 carvalho2707

Same here, haven't figured it out yet.

diegoyac avatar Jul 30 '24 22:07 diegoyac

Same problem here. https://stackoverflow.com/questions/78813631/android-credentials-google-sign-in-error-16-account-reauth-failed In my case the same exact credentials in a test project works fine. But in the project i want to itnegrate i does not work at all

MrMak21 avatar Jul 31 '24 08:07 MrMak21

I found the root of cause.
Because my project contains a lot of modules, i accidentaly provided the wrong SHA-1 (of another module) in the google credentials.
It is not clear form the error that google provide us, but please make sure that you provide the correct SHA-1

MrMak21 avatar Jul 31 '24 14:07 MrMak21

@MrMak21 Same with you. I uploaded wrong SHA-1 in the firebase console too. It's all good after providing the correct one.

xxxape avatar Aug 01 '24 02:08 xxxape

I had the same error and my SHA-1 was correct. The problem was that the scope settings for OAuth Consent Screen was Internal. That means Google Sign-in features is restricted to your Google Workplace accounts only. Make sure you set it to External so that users can use any Google account.

sembozdemir avatar Aug 09 '24 11:08 sembozdemir

Thanks everyone for ongoing communciation here for resolution, looks like a few of you had SHA1 issue on your end. Closing, feel free to reopen if there is anything.

niharika2810 avatar Aug 30 '24 06:08 niharika2810

Was having the same error when using GetSignInWithGoogleOption. By default the app build.gradle uses .debug as an applicationIdSuffix so you will need to append .debug at the end of your package name when creating the android client ID.

ahudson20 avatar Sep 19 '24 21:09 ahudson20

I also came across this issue where I was also using the wrong SHA1.

./gradlew signingReport gives the SHA1 from the "upload" key which is not correct. I need fetch the SHA1 of my "signing" key from Google Play Console.

RyeGordo avatar Dec 28 '24 11:12 RyeGordo

found answer following @ahudson20 answer. If you are having product flavours don't forget to add applicationSuffix with the package name, if declared in the gradle file.

SajithKumara avatar May 06 '25 19:05 SajithKumara

I had the issue because I wasn’t connected to the Internet and it took me two hours to figure it out.

So in addition to making fun of me, I think it could be great if the lib handled this case with a different error message so exhausted people could spare some time.

Ge0 avatar Jul 06 '25 20:07 Ge0