Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ishandutta2007 opened this issue Oct 15, 2017 · 21 comments

Comments

@ishandutta2007
Copy link

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.

@samtstern
Copy link
Contributor

@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.

@ishandutta2007
Copy link
Author

solved here

@alexandranb
Copy link

Hi,

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

Thanks

@suniali
Copy link

suniali commented Jun 22, 2019

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!

@AsithaIndrajith
Copy link

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

@braysonjohn148
Copy link

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']
}
}

@Navayuvan-SB
Copy link

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

@zuhairnaqi
Copy link

zuhairnaqi commented May 7, 2020

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.

@carlg0020
Copy link

Hi, someone was able to fix the error. I tried the following:

  1. Get SHA1 from the debug keystore and add the firebase project settings.
  2. Get SHA1 Released on Play App Signing
  3. Link the application with the Play Console.

All those options didn't work for me, I removed the app and it didn't work either.

The login with Phone Number does not work, but the Facebook one does.

The first time I thought I had managed to fix the error, I tried it in Internal Tests and it worked fine, I uploaded it to production, and then it stopped working again.

I'm really desperate and I don't know what to do

@NatyN-teac
Copy link

hey there guys, i m also experiencing the "this app is not authorized to use Firebase Authentication error" here is what i did, i have signed the application and add SHA-1 key of release(uploading key) to firebase, and also i have added google play key to firebase, even also i add the debug key also. but its keeps showing me that firebase auth is not working for my OTP, But in debug mode when i run it from my android studio directly its working, when i build the apk and after i upload to play store its not working, any help would be appriciated ...

@adamGT
Copy link

adamGT commented Mar 25, 2021

I've had this same issue for days. After trying every possible solution I found out my firebase-auth dependency version was (19.3.1) and when I change it to the latest i.e (20.0.3) it worked fine.
I hope this helps

@NatyN-teac
Copy link

after one day of not working, then it starts working in both mode, but other issue came out when i upload the same apk i built for release to playstore it's not working but the same apk works when i install on my phone, i have done every possible configuration that might go wrong correctly.... can any one help on this

@aasif1297
Copy link

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']
}
}

Same issue. Got any solution?

@rohitsharma181589
Copy link

I am also facing same issue, please suggest.

@aasif1297
Copy link

I am also facing same issue, please suggest.

I have just changed the these two lines in app build.gradle file and it worked. You can try this too.

classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.4'

@HrishikeshPator
Copy link

hey there guys, i m also experiencing the "this app is not authorized to use Firebase Authentication error" here is what i did, i have signed the application and add SHA-1 key of release(uploading key) to firebase, and also i have added google play key to firebase, even also i add the debug key also. but its keeps showing me that firebase auth is not working for my OTP, But in debug mode when i run it from my android studio directly its working, when i build the apk and after i upload to play store its not working, any help would be appriciated ...

Hey i'm facing the same issue... did you manage to solve it out?

@enriquejuan2
Copy link

For me what i did was to update

I am also facing same issue, please suggest.

I have just changed the these two lines in app build.gradle file and it worked. You can try this too.

classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.3.4'

This worked for me, i also upgraded the authentication dependency.

@5undaram900d
Copy link

how to resolve this error in flutter firebase, Please help me quickly. I am adding all SHA-key but also this error happen for only phone authentication -
error - This app is not authorized to use Firebase Authentication. Please verify that the correct package name, SHA-1, and SHA-256 are configured in the Firebase Console. [ Invalid request fields in play_integrity_token ]

@thatfiredev
Copy link
Member

@5undaram900d this answer might help you. Make sure you get the SHA-256 from the Play console.

@smedic
Copy link

smedic commented May 23, 2023

I have this problem with Firebase BOM version 32.0.0. After I switched back to 31.0.0, problem disappeared. Pretty confusing.

@uv77
Copy link

uv77 commented Apr 18, 2024

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

I never thought about it till now , And it Fucking worked . Thanks Maaan .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests