Google authentication doesn't work after downloading the app from play store

Viewed 347

I made an application with google authentication using firebase and it works fine. But when I published it on play store and then downloaded it the google authentication doesn't work. I tried removing the app again uploading it checked it's firebase connections. Everything works fine when I run from emulator but I don't know what happens after going through the play store. If anyone has any idea what might be the reason, please help.

2 Answers

If you enabled App Signing by Google in Play Console, it will sign your app bundle again, regardless if it's already signed. This will mess up Google Firebase.

Open Google Play Console and go to Release management > App signing. You may see this message on the top of the page: App Signing by Google Play is enabled for this app.

You'll also see the App signing certificate with MD5, SHA1 and SHA256 fingerprints. This is the fingerprint you have to use in Firebase Console, and not the one you used while building your app!

Copy the SHA1 key, go to Firebase Console, click the gear icon on the left panel, then choose Project settings. Scroll down to the app, and add the fingerprint to any existing ones. I added both the original and the Play Store-generated fingerprints, just in case.

You won't need to update google-services.json.

Related