[SOLVED] "auth/unauthorized domain" error in Firebase Auth
![[SOLVED] "auth/unauthorized domain" error in Firebase Auth](/_next/image?url=https%3A%2F%2Fwp.codingbeautydev.com%2Fwp-content%2Fuploads%2F2023%2F11%2Ffirebase-auth-unauthorized-domain-2.png&w=3840&q=75)
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.
![](/_next/image?url=https%3A%2F%2Fwp.codingbeautydev.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fimage-25-1024x637.png&w=3840&q=75)
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.](/_next/image?url=https%3A%2F%2Fwp.codingbeautydev.com%2Fwp-content%2Fuploads%2F2023%2F11%2Ffirebase-auth-unauthorized-domain-1024x499.png&w=3840&q=75)
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.](/_next/image?url=https%3A%2F%2Fwp.codingbeautydev.com%2Fwp-content%2Fuploads%2F2023%2F11%2Fimage-26-1024x290.png&w=3840&q=75)
See also
- How to easily fix the "Command not found" error in VS Code
- How to Fix the "Cannot access before initialization" Reference Error in JavaScript
- How to easily fix the "Cannot read property 'classList' of null" error in JavaScript
- How to Fix the "Cannot find name 'console'" Error in TypeScript
- How to quickly toggle (enable/disable) autosave in VS Code
- Fix "Cannot read property 'map' of undefined" in React