Search code examples
androidfirebasegoogle-signin

Which SHA-1 (debug or release) need to be added to a firebase android project


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)


Solution

  • 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.