Guide
auth/app-not-authorized: the app is not authorized to use Firebase Authentication
How this guide was made: Written with AI assistance and checked against the sources linked on this page.
Updated
Short answer: auth/app-not-authorized means Firebase Auth does not accept this app. On Android, the package name and SHA-1 fingerprint in your build must match the app registered in the Firebase console. On web, check the API key restrictions and the authorized domains. Fix the value that differs, then test again.
What does auth/app-not-authorized mean?
The Firebase Node reference describes auth/app-not-authorized as an app identified by the domain where it is hosted that is not authorized to use Firebase Authentication with the provided API key. The steps below use the Android package name and SHA-1 fingerprint, and the API key and domain settings for web. Our suggestion: check each cause below in order, and change one value at a time so you can see which change worked.
Which cause is it?
| What you see | Cause | Fix |
|---|---|---|
| Android sign-in fails after a package rename, or the package name differs between Android Studio and Firebase | The package name in Firebase is not the name your app uses | Cause 1 |
| Android sign-in works in a debug build but fails in a build signed with another key | The SHA-1 fingerprint is missing for that signing key | Cause 2 |
| Calls fail after you set restrictions on an Android or web API key | The API key restriction does not allow this app or the Identity Toolkit API | Cause 3 |
| Web sign-in fails on a live domain | The domain is not in the authorized domains list | Cause 4 |
1. The package name in Firebase does not match the app
The Firebase Android setup page says: "Make sure to enter the package name that your app is actually using." It also says to "Find your app's package name in your module (app-level) Gradle file." (Firebase: Add Firebase to your Android project)
- Open your app's module (app-level) Gradle file and find the package name.
- Open the Firebase console, go to Settings, then the General tab, then the Your apps card, and select your Android app. (Firebase: Authenticate with Google on Android)
- Compare the package name in the console with the one in Gradle.
- If they differ, our suggestion is to add an Android app with the correct package name in the console. Then download the new config file. The setup page says to "Click Download google-services.json to obtain your app's Firebase config file," and to "Move your config file into the module (app-level) root directory of your app."
- Rebuild the app and test sign-in again.
2. The SHA-1 fingerprint is missing or belongs to another key
Firebase's Android sign-in page says: "Specify your app's SHA-1 fingerprint if you haven't already," and to "add your SHA-1 fingerprint in the SHA certificate fingerprints field." (Firebase: Authenticate with Google on Android) A debug build and a release build use different keys. Google's page says that "most app stores (including the Google Play Store) do not accept apps signed with a debug certificate for publishing." (Android: Sign your app)
- Get the SHA-1 of the debug build. Google's guide says "If you don't use Play App Signing, you can use Keytool or Gradle's signingReport to obtain your SHA-1." For the Gradle route, run
./gradlew signingReport. For Keytool, runkeytool -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore, then enter the password. The guide says "The default password for the debug keystore is android." (Google: Authenticate your client) - For an app installed from Google Play, open Play Console, then Release, Setup, App signing. The page lists "The MD5, SHA-1 and SHA-256 fingerprints of the upload and app signing certificates." (Android: Sign your app) Copy the SHA-1 for the key that signs the build you are testing.
- In the Firebase console, open the Android app under Settings, General, Your apps. Add the SHA-1 to the SHA certificate fingerprints field.
- Download the config file again. The setup page says: "You can download your Firebase config file again at any time." Replace the old file in the module root directory.
- Rebuild the same build type and test sign-in.
3. The API key restriction does not match the app
Google Cloud's API key guide says that for Android apps, "You must provide the package name and the 20-byte SHA-1 certificate fingerprint for each app." (Google Cloud: Manage API keys)
- Open the Google Cloud console, then APIs & Services, then Credentials. (Firebase: API keys)
- Open the key your app uses and choose edit.
- Under Application restrictions, for an Android app, enter the package name and the SHA-1 from Cause 2.
- For a web key, the guide says: "To control which websites can use your API keys, you can add one or more HTTP referrers as website restrictions." Add your site there.
- Under API restrictions, keep the Firebase APIs allowed. The Firebase page says: "be very careful to not remove the APIs required for Firebase and the Firebase services that you use." It lists identitytoolkit.googleapis.com for Authentication.
- Save, then test. The Firebase page says: "For API keys in use by production apps, be cautious about changing its restrictions or limits." The pages we read do not say how long a restriction change takes to apply.
4. The domain is not in the authorized domains list
Firebase's web redirect guide says: "Make sure your continue_uri is in the list of authorized domains." (Firebase: Redirect best practices) The Firebase JS SDK message for this case reads: "This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console." (Firebase JS SDK: errors.ts)
- Open the Firebase console and edit the list of authorized domains.
- Add the domain your site runs on. Our suggestion: add the exact host you open in the browser.
- Check the web API key restrictions in Google Cloud, as in Cause 3, so the site is allowed.
- Test sign-in in a new private window on the live domain.
How do I check it's fixed?
- Our suggestion: for Android, rebuild the same build type you test, install it, and sign in with a test account.
- Confirm sign-in completes and the signed-in screen loads.
- For web, open the live domain in a private window and sign in.
- If the message returns, check the value you changed last against the value in the other place. The package name must match in Gradle and Firebase, and the SHA-1 must match the key that signs the build.
FAQ
Is my debug SHA-1 the same as the Play Store SHA-1?
No. Android Studio signs debug builds with a debug certificate, and Google's page says most app stores, including Google Play, do not accept apps signed with it for publishing. Add the fingerprint for the key that signs the build you test. The Play Console page lists the app signing fingerprints.
Do I need the SHA-256 as well?
The Firebase steps we read ask for the SHA-1 fingerprint. The Play Console page lists SHA-256 too. Our suggestion: add the SHA-1 first and test. Add the SHA-256 only if a Firebase screen asks for it.
Can changing API key restrictions break my app?
The Firebase API key page says: "For API keys in use by production apps, be cautious about changing its restrictions or limits." Keep the Firebase APIs in the allowed list.
Which settings does this error check?
The Firebase Node reference describes this code as an app identified by its hosting domain that is not authorized to use Firebase Authentication. The steps above check the settings those pages describe.
Can VibeFix fix it for me?
Yes, for apps built in Lovable or any app whose code is on GitHub. The free check confirms the problem on your live app first. If you want it fixed, our AI agent finds the cause, fixes it in your code for $79 and tests your live app again. See pricing.
Related guides
- Firebase auth: unauthorized domain
- Firebase Google sign-in not working: enable the provider
- Lovable sign-in works in preview but fails when published
Sources
- Firebase: Add Firebase to your Android project
- Firebase: Authenticate with Google on Android
- Google: Authenticate your client
- Android: Sign your app
- Google Cloud: Manage API keys
- Firebase: API keys
- Firebase: Redirect best practices
- Firebase JS SDK: errors.ts
Last checked: 17 November 2026.
VibeFix is independent. Firebase is a trademark of its owner.
More guides · Shopify store accessibility · About · Your privacy choices