'Uncaught (in promise) FirebaseError: Firebase: Error (auth/unauthorized-domain). error

When I try to open google sign-in in the deployed version of my app I get this error in the console and the popup closes. I have googled a bit about this error and I found that I need to add the domain in my firebase through Authentication -> SignIn method ->Authorized domains and then add the domain I have also tried this but it doesn't work.

enter image description here

and when I try to open the google sign in popup I get this error in the console: enter image description here

How can I enable google authentication in the deployed app?



Solution 1:[1]

  1. Open Firebase
  2. Go to console
  3. Open your project
  4. Go to Authentication
  5. sign-in-method
  6. Add domain

Try it!

In my case it's working

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Roman Mahotskyi