Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Auth/unauthorized domain. Domain is not authorized

I am trying to run this sample firebase project, but I keep getting this error in the browser console.

Lf {code: "auth/unauthorized-domain", message: "This domain (mail-demo-fcm.firebaseapp.com) is not…se console -> Auth section -> Sign in method tab."}

code: "auth/unauthorized-domain"

message: "This domain (mail-demo-fcm.firebaseapp.com) is not authorized to run this operation. Add it to the OAuth redirect domains list in the Firebase console -> Auth section -> Sign in method tab."

I have enabled Google in Authentication -> Sign-in Method as sign-in providers.

enter image description here

Am I missing something ?

A little guide will be helpful.

And I am using Firebase's free plan.

like image 499
moonwalker7 Avatar asked Jan 03 '18 12:01

moonwalker7


3 Answers

You need to add domain mail-demo-fcm.firebaseapp.com to Authentication menu in Firebase at Authorized domains enter image description here

like image 117
alkas Avatar answered Oct 29 '22 14:10

alkas


Below the sign-in method section, there is a Authorized domains section. I think you need to whitelist your domain there.

like image 34
Ti Wang Avatar answered Oct 29 '22 14:10

Ti Wang


The authorized domains section might also be in the settings page. Here is a screenshot: Screenshot of firebase authorized domains

like image 35
chrisdemeke Avatar answered Oct 29 '22 15:10

chrisdemeke