Error while using Firebase Authentication


I am using Firebase Authentication for my website. Everything is working fine while I am testing but when I move it to production I am getting the following exception.

{
"code":"auth/unauthorized-domain",
"message":"This domain (foo.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."
}

2 Answers

7 years ago by

You need to add your domain to the whitelisted domains to make Firebase Authentication working. To do that go to Firebase -> Your Project -> Authentication -> SignIn Method Tab

There you see Authorized domains List. Add your domain name there to make Firebase Authentication work on your domain.

info-about-image

7 years ago by Karthik Divi

if we are running our react project in localhost 3000 port then how we can give the Authorized domains

2 years ago by Lakshmi Thotakura