This application is not authorized to use Firebase Authentication. Verify that the correct package name and SHA-1 are configured in the Firebase console

Firebase auth worked fine, the debug build suddenly started crashing without any code changes, writing the following message

D / PhoneAuthActivity (7392): signInWithCredential: failure: com.google.firebase.auth.FirebaseAuthException: This application is not allowed to use Firebase Authentication. Verify that the correct package name and SHA-1 are configured in the Firebase Console. Application verification error.

The only noticeable action between a successful login and a crash is updating Android Studio.

+13
source share
5 answers

When updating Android Studio, the debug key that is used to sign debugging applications might change. Just add the new SHA-1 checksum of your debug key to the Firebase console.

The easiest way is to connect / sync with firebase from

Tools> Firebase> Authentication> Connect> Sync


If you want to do this manually or unlock the keystore, first generate the SHA-1 checksum using the following command:

keytool -list -v -keystore KEYSTORE_PATH -alias ALIAS_NAME 

Then copy the SHA-1 checksum and go to:

Firebase Console> Your project> Application Settings> Add fingerprint

+27
source

A simple solution for an application signed by the application.

  • Find the fingerprint of the SHA-1 certificate in the application signature on the console of the game store.

Play store console> Your project> Release management> Signing an application

enter image description here

  • Put both SHA1 fingerprints in your Firebase app.

Firebase Console> Your project> Application Settings> Add fingerprint

enter image description here

  • Good thing we don’t need to generate SHA1 fingerprint from cmd with keystore.
+10
source

Ok, I just realized the problem. If you use the signature of the Play Store application, then SHA1 from your distributed application will be different from the one you use locally. Make sure you add the SHA1 key from the Play console to your application in the Firebase console.

+2
source

this happens when we change our android studio or when we install it again, the SHA1 code changes and firebase can now authenticate your application, so to overcome this just open your signature report and get a new sha1 code and just add this code in firebase setup of projects :)

0
source

I got the same problem and solved as it should

Create a .keystore file like in this document https://facebook.imtqy.com/react-native/docs/signed-apk-android

generated SHA-1 key with this command

 keytool -list -v –keystore [PATH]\android\app\my-upload-key.keystore 

And copy the SHA1 key under the fingerprints of the certificates and add the firebase settings-> genaral tab-> your application section-> SHA certificate fingerprints to it

0
source

Source: https://habr.com/ru/post/1272634/


All Articles