Firebase Auth Sign-in does not work after releasing flutter project to Play Store

Viewed 3061

I'm running into trouble signing into my Android app after I released it to the Play Store (internal and closed testing releases). Basically, my sign-in options (email & third party) do not work. Firebase is connected, because I can properly create accounts and write to Firestore via the app. If I have an error (wrong password, wrong email, etc), Firebase will kick that error back to me. However, a “successful” login simply does not result in a finished sign in process, and my app is stuck on that await method forever.

I have no problems when running on an emulator, running on Android devices straight from Flutter (both release and debug modes), or running on iOS in any capacity.

What is going on here? I don't think it's my actual code, and I must be missing a step as part of the Android release process. I have permissions requested for internet and access network state, the SHA keys should all be good to go for Firebase (added debug, release, and Play Store keys) and my firebase dependencies are the most up to date.

4 Answers

When the application is uploaded to Google Play, a new SHA1 code is generated

All you have to do is copy the new code and add it to the Firebase project.

when you signed your APK with SHA-1 and upload the APK it only signed by you but as per the new update it is also signed by Google Play for more security.

You can check this.

I Solved the issue by

-> adding all SHA-1 keys for debug and release and google play (if you released to the play store and let it manage signing the app) to my firebase console Project setting > general > app > SHA certificate fingerprints

after that

-> download a fresh google-services.json file and replace it with the old one in your project if have any

Update SHA-1 Key in Firebase project setting

enter image description here

Also check your google cloud project api key setting and also add SHA-1 Key credentials if you have Key restrictions.

enter image description here

Related