Home  >  Article  >  Java  >  Why Am I Getting the \"This app is not authorized to use Firebase Authentication\" Error in Debug Builds?

Why Am I Getting the \"This app is not authorized to use Firebase Authentication\" Error in Debug Builds?

DDD
DDDOriginal
2024-10-27 01:36:02591browse

Why Am I Getting the

Firebase Authentication Error: "This app is not authorized to use Firebase Authentication"

Developers encountering the error message "This app is not authorized to use Firebase Authentication" when using Firebase auth in debug builds often find themselves at a loss after a successful login. The error suggests an issue with package name and SHA-1 configuration in the Firebase Console. To rectify this problem and ensure proper authentication, follow these steps:

Update Firebase App with SHA-1 and SHA-256 Fingerprints

(Updated as of May 12, 2022)

  1. Retrieve the SHA-1 and SHA-256 certificate fingerprints from the Play Store Console under "Release > Setup > App integrity."
  2. Log into the Firebase Console and navigate to the project settings for your app.
  3. Add both the SHA-1 and SHA-256 fingerprints to the "Firebase App" settings.

Additional Considerations:

  1. Obtain the local SHA-1 and SHA-256 fingerprints using the command "./gradlew signingReport."
  2. Emulator usage for phone OTP verification may fail due to the lack of a SIM card. Test on a physical device instead.
  3. Ensure that the "Android Device Verification" option is enabled during project configuration and that the correct project is selected.
  4. Refresh the google-services.json file and integrate it into your project.

By implementing these steps, you can resolve the Firebase Authentication error and ensure a seamless login experience in debug builds.

The above is the detailed content of Why Am I Getting the \"This app is not authorized to use Firebase Authentication\" Error in Debug Builds?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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