6

I have been trying to integrate Firebase Google Login in my app but I am getting com.google.android.gms.common.api.ApiException: 10:

Based on this Stack Overflow Question, I have even tried using WebClient Client ID but still getting the same error!

Based on this Stack Overflow Question, I have entered my Debug KeyStore SHA1, SHA256 and enabled Google Login

On Android Side, I have followed this Github Project

I have added SHA 1 and SHA256 of my debug keystore

I even tried with this Client ID but still getting the same error!
Where am I going wrong? I even tried with this CLient ID but still getting same error!

Dhruv Kaushal
  • 632
  • 8
  • 17

3 Answers3

7

After struggling for two day I finally got the solution.
You need to add the SHA from your Google Play Console Dashboard.
Go to Release Management->App Signing
Add this SHA in firebase console.

This works only in release apk version

Update: This is because I enabled Google Play App Signing while uploading the app for the first time. enter image description here

Dhruv Kaushal
  • 632
  • 8
  • 17
0

Please make sure that the string from: R.string.default_web_client_id is the Web API Key from Firebase > Project Settings.

Stefan Ciprian Hotoleanu
  • 2,202
  • 1
  • 23
  • 30
  • I don't think there's anything to "make sure". That value is auto generated from the google-services.json, which is generated on firebase. – Hiro Dec 17 '20 at 16:00
0

For other folks who get here, and don't use Google Play Signing, the solution is to do the following within Android Studio:

-TOOLS->FIREBASE (Assistant with Firebase Context will open).
-Click and drop down "Authentication"
-Click "Email and Password Authentication" -OR- "CONNECT TO FIREBASE"
-Dialog with "Existing Connection Found" with SYNC Button appears
-Click "SYNC" and then build and all should be good again

Natie
  • 2,284
  • 3
  • 19
  • 20