This app is not authorized to use Firebase Authentication.Please verify that the correct package name and SHA-1 are configured in the Firebase Console

ishandutta2007 picture ishandutta2007 · Oct 15, 2017 · Viewed 51.4k times · Source

Firebase auth was working fine, the debug build suddenly started failing without any change of code, logging the folloing message

D/PhoneAuthActivity( 7392): signInWithCredential:failure:com.google.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 ].

The only notable action inbetween a successful login and failure is android studio upgrade.

Answer

Rumit Patel picture Rumit Patel · Nov 28, 2018

A simple solution for App-signed enabled app.

  • Find SHA-1 certificate fingerprint from App signing from play store console.

UPDATE (10-10-2020) FOR NEW PLAYSTORE CONSOLE:

Play store Console > Your project > Release > Setup > App signing

enter image description here

FOR OLD PLAYSTORE CONSOLE:

Play store Console > Your project > Release management > App signing

enter image description here

  • Place both SHA1 fingerprints to your firebase app.

Firebase Console > Your project > Settings of the app > Add Fingerprint

enter image description here

  • The good thing is we don't need to generate SHA1 fingerprint from cmd with the help of the Keystore.