3

I've recently started new android firebase project and added my debug SHA-1 key I generated in android studio. I grabbed config .json file and started working in the app. Particular are of interest for this was google sign in.

Everything worked fine locally, so I created signed build (using signing keys managed by google play console and my upload key). I published build to internal testing. When I downloaded the app through play store, my google sign in was no longer working, so I assumed it is because I need to add SHA-1 for production / release build?

I added my App signing key certificate SHA-1 from google play console to firebase and downloaded new config json file. Now, google sign in doesn't work in debug nor in release and I am very confused.

Which SHA-1 keys need to be added to firebase? I have Debug, App signing key certificate (from google play console) and Upload key certificate (from google play console)

Ilja
  • 44,142
  • 92
  • 275
  • 498
  • This [answer](https://stackoverflow.com/questions/51360250/firebase-ui-authentication-with-google-fails-with-message-code10-message10/51360406) might help. – Alex Mamo Feb 26 '21 at 12:04

2 Answers2

2

You didn't add the Release SHA-1 Key in firebase. You need to add both. The debug key for developing and the release key is for when the app is released.

The debug and release SHA-1 key are different.

Here someone explains how to get the release key. https://medium.com/fabcoding/how-to-obtain-sha1-keys-for-debug-and-release-android-studio-mac-34ff3703470b#:~:text=If%20you%20have%20enabled%20App,ll%20see%20you%20release%20SHA1.

Viatcheslav Ehrmann
  • 716
  • 2
  • 5
  • 11
0

Add both debug and release SHA-1 to the project in firebase console. Then it will work for both; if you install app directly from android studio or download from Google Play Store. enter image description here

ibrahim
  • 83
  • 1
  • 8