Why Do I Get Com.Google.Android.Gms.Common.Api.Apiexception: 10:

Google sign in failed com.google.android.gms.common.api.ApiException: 10:

Basically problem is in the SHA1 key put on console please regenerate it and put again properly same project.

1)As the answers, make sure that your actual signed Android apk has the same SHA1 fingerprint as what you specified in the console of your Firebase project's Android integration section (the page where you can download the google-services.json)

For more info, see: Generate SHA-1 for Flutter app

2)On top of that go to the Settings of your firebase project (gear icon right to the Overview at the top-left area. Then switch to Account Linking tab. On that tab link the Google Play to your project.

EDIT:
Account Linking tab doesn't exist any more, instead :

  1. Sign in to Firebase.
  2. Click the Settings icon, then select Project settings.
  3. Click the Integrations tab.
  4. On the Google Play card, click Link.

enter image description here

Google Sign In throws an exception com.google.android.gms.common.api.ApiException: 12500

because at least it was working before I uploaded it to play store

Problem (a feature called Play App Signing)

It seems like the Google Play Store is signing your app instead of you, so Firebase detects a different signing key, and prevents authentication. Re-signing apps is a Google Play Store feature, and preventing apps signed by signing keys which you haven't verified from authenticating with Firebase is a Firebase feature.

Solution

Go to Google Play Store Console → Setup → App Signing → App signing key certificate, copy the SHA-1 certificate fingerprint.

Then go to Firebase Console → Project Settings → Your Apps → Add Fingerprint → and paste the SHA1.

What you are doing

Telling Firebase to accept authentication requests generated from an app signed by the key handled by Google Play Store. It previously only accepted requests from an app signed by your locally signed app, where the key is stored on your computer.

Copy SHA-1 from here:

Play Console screenshot

Paste SHA-1 as a fingerprint here:

enter image description here



Related Topics



Leave a reply



Submit