Firebase Auth auth/unauthorized-domain
The domain of the continue URL is not whitelisted.
Debug error automatically with DrDroid AI →
Connect your tools and ask AI to solve it for you
Understanding Firebase Auth
Firebase Authentication is a comprehensive authentication system that allows developers to easily integrate secure sign-in and identity management into their applications. It supports various authentication methods, including email/password, phone numbers, and popular federated identity providers like Google, Facebook, and Twitter. Firebase Auth is designed to make authentication simple and secure, enabling developers to focus on building great user experiences.
Identifying the Symptom
When using Firebase Auth, you might encounter the error code auth/unauthorized-domain. This error typically presents itself when attempting to redirect users to a URL that is not authorized by your Firebase project. Users may see an error message indicating that the domain is not whitelisted, preventing them from completing the authentication process.
Explaining the Issue
The auth/unauthorized-domain error occurs when the domain of the continue URL used in the authentication process is not included in the list of authorized domains in your Firebase project settings. Firebase requires that all redirect domains be explicitly whitelisted to prevent unauthorized redirections and ensure security.
Why Whitelisting is Necessary
Whitelisting domains is a security measure to ensure that only trusted domains can be used for authentication redirects. This prevents malicious actors from redirecting users to unauthorized or harmful sites during the authentication process.
Steps to Fix the Issue
To resolve the auth/unauthorized-domain error, follow these steps:
Step 1: Access Firebase Console
Log in to your Firebase Console and select your project. Ensure you have the necessary permissions to modify project settings.
Step 2: Navigate to Authentication Settings
In the Firebase Console, go to the Authentication section. You can find this in the left-hand menu under the Build category.
Step 3: Add Authorized Domains
Within the Authentication settings, locate the Sign-in method tab. Scroll down to the Authorized domains section. Here, you can add the domain of the continue URL that is causing the error. Click on Add domain and enter the domain name.
Step 4: Save Changes
After adding the necessary domains, ensure you save the changes. This will update your Firebase project settings to include the new authorized domains.
Additional Resources
For more information on managing authorized domains in Firebase, refer to the official Firebase documentation. If you encounter further issues, consider visiting the Firebase Support page for additional help.
Still debugging? Let DrDroid AI investigate for you →
Connect your tools and debug with AI
Get root cause analysis in minutes
- Connect your existing monitoring tools
- Ask AI to debug issues automatically
- Get root cause analysis in minutes