Authorization issue with Firebase when publish app to Play Store

@jothedev
@jothedev
Sep 9, 2018 · 2 min read

Big day is coming, the beta version needs to be released asap. We thought that we had all in covered. Tested release configuration on real devices, all was running well and went straight to published the app. And first feedback coming with the crash:

Firebase.Auth.FirebaseAuthException: This app is not authorized to use Firebase Authentication. Please verifythat the correct package name and SHA-1 are configured in the Firebase Console. [ App validation failed ]

This issue indicated that Firebase didn’t recognized the app with the package name and sha-1 from the signed app that we have published. Even thought that we have add all the corrected information and it tested run with this error on local device.

After spending the whole night figuring out what was the issue. I’ve found the culprit! It was in the App Signing for Google Play that we have opted-in. In the documentation, it says below:

So, the registered SHA-1 from the local keystore signature was unusable when the app published. We need to register the SHA-1 from the App Signing itself. It can be found in the inside Google Play Console under Release Management > App Signing. It will have two types of certificate:

  1. Upload certificate: this is the information of the certificate from the keystore that uploaded. This is needed to be the same with the keystore for app signing locally as the Google Play will verify the uploaded app to match with this signed certificate.
  2. App Signing certificate: after uploaded the app, Google will replace the upload certificate with this certificate. This is a new certificate that will be used for published app in Play Store.

With those information, I just realize that we hadn’t registered the SHA-1 for the App Signing certificate which being used by published app. So, I added the SHA-1 (also the SHA-256, just in case needed) fingerprints in the Firebase > Project Setting for the app (Don’t forget to update the latest config file after added the fingerprints).

And now, no more authentication error. (Or not so fast, still waiting for more feedback from the beta tester. XD)

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade