简体   繁体   中英

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

I changed my app package name since it was "example" was rejected on the play store during upload but after I changed it's unable to connect to firebase and I can no longer access the data there, I have also changed the package name on the manifest, build. Gradle and also the JSON file level but still, the app is giving back this 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 ]

Follow below mentioned steps to resolve this issue:

  1. Add android app in firebase console with your new package name and delete the old one.
  2. Go to project settings in firebase console, add SHA1 and SHA-256 key there. For more info about debug and release keys check this link
  3. Now download google-services.json and add into your project in android studio.
  4. check applicationId in your build.gradle(:app)it should be the new one.
  5. Clean and rebuild your project.
  6. Test your app on real device.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM