Quickstart-android: This app is not authorized to use Firebase Authentication. Please verifythat the correct package name and SHA-1 are configured in the Firebase Console.

Created on 15 Oct 2017  Â·  8Comments  Â·  Source: firebase/quickstart-android

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 activity inbetween a successful login and failure is android studio upgrade.

Most helpful comment

Just open terminal enter this command cd android && gradlew signingReport you'll get multiple information in which copy Task :app:signingReport > debugUnitTest > SHA1 and add to firebase SHA certificate fingerprints.
After all re-build your app. Then it'll work.

All 8 comments

@ishandutta2007 the error message tells you exactly what is going on. At some point in your "android studio upgrade" you likely deleted your android debug keystore which means your builds have a new SHA1 . Just follow the steps to add your app to your Firebase project again and this should be fixed.

solved here

Hi,

The solution mentioned above doesn't help me. Did it help you?

Thanks

Hello,
This solution doesn't help me.
My phone is Samsung Note 5.

err

Phone number verification failed. Code: firebaseAuth. Message: 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 ]

Note:I am using email authenticate and facebook auth right now and I don't have any problem.the problem is when I want use phone authenticate.

flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.16299.1217], locale en-US)

[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.4)
[√] VS Code (version 1.35.1)
[√] Connected device (1 available)

• No issues found!

'./gradlew clean' -> inside root folder
Then re-buid the project

I was using a Window computer, now i switched to Mac so i copied the whole app folder. But the problem is i get the error:

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. [ App validation failed ]

I signed it also. i got the SHA-1 code and added to google.

signingConfigs{
release{
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}

Make sure you are running your app on a Physical Device. This error mostly occurs when you are running your app in an emulator.

Just open terminal enter this command cd android && gradlew signingReport you'll get multiple information in which copy Task :app:signingReport > debugUnitTest > SHA1 and add to firebase SHA certificate fingerprints.
After all re-build your app. Then it'll work.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

hungud picture hungud  Â·  6Comments

rosariopfernandes picture rosariopfernandes  Â·  6Comments

llooz picture llooz  Â·  5Comments

DenLangeKilde picture DenLangeKilde  Â·  5Comments

rahuldevanavar91 picture rahuldevanavar91  Â·  5Comments