Home > Java > javaTutorial > \'This App Is Not Authorized to Use Firebase Authentication\': How to Solve the Error After an Android Studio Upgrade?

\'This App Is Not Authorized to Use Firebase Authentication\': How to Solve the Error After an Android Studio Upgrade?

Linda Hamilton
Release: 2024-10-29 08:47:02
Original
692 people have browsed it

"This App Is Not Authorized to Use Firebase Authentication" Error in Firebase Console

Problem:

Firebase Authentication was functioning without issues. However, after an Android Studio upgrade, the debug build began to fail, displaying the following error message:

D/PhoneAuthActivity( 7392): signInWithCredential:failure:com.google.firebase.auth.FirebaseAuthException: 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 ].
Copy after login

This error occurred despite not making any changes to the code after a successful login.

Solution:

Updated (May 12th, 2022):

  1. Obtain the SHA-1 and SHA-256 certificate fingerprints from the Play Store Console:
Play store Console > Your project > Release > Setup > App integrity
Copy after login

[Image: SHA-1 and SHA-256 fingerprints from Play Store Console]

  1. Add both SHA-1 and SHA-256 fingerprints to your Firebase app:
Firebase Console > Your project > Settings of the app > Add Fingerprint
Copy after login

[Image: Fingerprints added to be in Firebase console]

Additional Considerations:

  1. Include the local SHA-1 and SHA-256 values. Use the command ./gradlew signingReport to get them. For more information, refer to this document.
  2. Phone OTP verification via emulator won't work because it lacks a SIM. Install the app on a mobile device with a SIM.
  3. Verify that the "Enable app verification step" is correctly configured and that Android Device Verification is enabled.
  4. Ensure the correct project is selected from the drop-down menu when enabling Android Device Verification.
  5. Both SHA-1 and SHA-256 fingerprints must be registered in the Firebase project.
  6. Use the most recent version of the google-services.json file after making all the changes.

The above is the detailed content of \'This App Is Not Authorized to Use Firebase Authentication\': How to Solve the Error After an Android Studio Upgrade?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template