firebasemobileoauth

Firebase: This domain is not authorized


I imported Firebase JS v3 API and used to initialize Firebase using:

firebase.initializeApp(config);

However the app failed to load correctly via web browser on localhost, resulting in the following error:

Error: This domain is not authorized for OAuth operations for your Firebase project. Edit the list of authorized domains from the Firebase console.

firebase.js:71:1333


Solution

  • I solved the problem by adding the localhost domain to OAuth redirect domains (within SETUP SIGN IN METHOD on the Auth tab of Firebase console).

    Updated: Aug 14 2023 - Now the Authorized domains section is moved to settings on the Authentication tab of Firebase console.