Error library

Firebase auth/unauthorized-domain

Firebase Auth rejects OAuth sign-in from domains that aren't in the project's authorized domains list. Add your custom domain (and preview domains you use) in Authentication settings.

Get this exact error fixed — $49 Quick FixFixed within scope, or we keep working until it is · Read-only access Not sure it's this error? $149 diagnosis

Cause: The app's domain isn't in Firebase Auth's authorized domains.

How to fix it

  1. Open Firebase console > Authentication > Settings > Authorized domains.
  2. Add your production domain (e.g. app.example.com).
  3. Add any preview domains you test on.
  4. Update OAuth provider settings if you use a custom auth domain.

Example

Illustrative example, not from a customer project.

  Authorized domains
    localhost
    myapp.firebaseapp.com
+   app.example.com

FAQ

Why does it work on localhost?

localhost is authorized by default.

Do I need to redeploy?

No, the change is in Firebase settings.

QUICK FIX · $49 · THIS ERROR ONLY

Get this exact error fixed — $49 Quick FixFixed within scope, or we keep working until it is · Read-only access Not sure it's this error? $149 diagnosis

One error, one root cause, fixed in your app. If it turns out bigger, we tell you before doing more, and your $49 is credited toward the fix, diagnosis or Launch Path if you book within 14 days. Fixing three? The 3-Error Pack is $119.

Bigger job: More than one auth or data issue? Auth & database security fix, from $400.

Built with Lovable, Bolt, Replit, Cursor or v0? See rescue by platform and the security checklist.

Check it yourself first, free

$49Fix this error