[SOLVED] "auth/unauthorized domain" error in Firebase Auth

Last updated on November 24, 2023
[SOLVED] "auth/unauthorized domain" error in Firebase Auth

In this article, we're going to learn how to easily fix the "auth/unauthorized domain" error which happens in the Firebase Authentication Web SDK.

What causes "auth/unauthorized domain" error in Firebase?

The Firebase "domain is not authorized" error happens when you try to use an API from Firebase Auth in a domain that is not authorized by Firebase.

It may occur in the FirebaseUI, or in your browser console.

The "auth/unauthorized" Firebase error occurring in FirebaseUI.

How to fix "auth/unauthorized domain" error in Firebase

To fix the "Domain not authorized" error in Firebase Auth, go to the Firebase Authentication Authorized domains settings for your project, using this link: https://console.firebase.google.com/project/_/authentication/settings.

Or by following these steps from the Firebase Console for your project in this image:

An image with steps to go to the Firebase Authentication Authorized domains settings page.

Enter the new domain in the dialog that shows after clicking Add domain:

Enter the new domain to register it as an authorized domain in Firebase Authentication.
Coding Beauty Assistant logo

Try Coding Beauty AI Assistant for VS Code

Meet the new intelligent assistant: tailored to optimize your work efficiency with lightning-fast code completions, intuitive AI chat + web search, reliable human expert help, and more.

See also