Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
I am implementing Google Sign In in Android. I only need to get the idToken of the Google account.
For implementation, I used GoogleSignInClient from com.google.android.gms:play-services-auth. I created an Android OAuth 2.0 Client in Google Cloud -> APIs & Services for debug and release certificates, added the same SHA-1 certificates to Firebase, created an OAuth Consent screen (I use only non-sensitive scopes: openid, userinfo.profile, user.info.email). When I create a GoogleSignInOptions object, I pass the web oauth client id created by the backend developer to requestIdToken(). I check that everything works, the window with the account selection appears, and the token is received.
I decided to upload the new version to the beta, since App Signing is enabled in the Google Play Console, I created an OAuth client for it and added its SHA-1 to Firebase, but after downloading the version from Google Play, when I try to get the idToken of the Google account, I get DEVELOPER_ERROR error code 10. The Internet says that the cause of the error is incorrect SHA-1 or web-client-id, but I've checked it a bunch of times, the SHA-1 is definitely correct because I copied it from Google Play Console, and the web-client-id also seems to be correct because I copied it from Google Cloud.
I also tried another oauth-web-client-id (auto-generated by Google services) in requestIdToken(), the situation is the same, it works on the debug/release build, in Google Play ‘DEVELOPER_ERROR’.
Since only non-sensitive scopes are used, OAuth consent screen verification is optional, but I decided to go through it just in case. I set Publishing status -> In production, User type -> External, successfully passed the verification, but it did not solve the error.
Since Google recommends switching to androidx.credentials.CredentialManager, I rewrote the functionality using it. The situation is the same, the debug/release build works, the version from Google Play gives an error, but now a different "GetCredentialCancellationException: activity is cancelled by the user" on Android 11 Poco X3 and "androidx.credentials.exceptions.GetCredentialCustomException:[28444] Developer console is not set up correctly" on Android 15 Google Pixel 8 Pro. The internet again says the error is in the wrong oauth-client-id, but as I mentioned above I've checked a lot of times, the SHA-1 is definitely correct because I copied it from Google Play, and the web-client-id also seems to be correct because I copied it from Google Cloud.
Also, I tried to verify app ownership in OAuth client in Google Cloud Console -> APIs & Services -> Credentials -> OAuth 2.0 Client IDs. But I get the error "This client is not applicable to verify ownership because it's not a Google Play Store app", regardless of which Android OAuth client I'm using with the SHA-1 of google play app signing key or release key. What could be causing this? Maybe the issues are connected?
I also tried to get the SHA-1 of the Google Play App signing certificate using this code.
It gave me the SHA-1 of the legacy Google Play App signing key certificate. Is it possible that Google Play is still using the legacy certificate to sign my app? I can't create an Android OAuth client with this legacy certificate because it's being used in another Android OAuth client in the other Google Cloud account that I no longer have access to.