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.
Am I missing something?
A little guide will be helpful.
And I am using Firebase's free plan.
Below the sign-in method section, there is a Authorized domains section. I think you need to whitelist your domain there.
@alkas 的解决方案很有帮助,但我还需要为我的应用程序(电子邮件/密码、谷歌等)明确启用登录提供程序,以消除此错误
Enable localhost and your own domain that you are using in the firebase console.
In my case, I found the problem after deleting localhost from my "Authorized domains".
So I just add it (localhost), so everything is okay !
-localhost, because I'm on local,
-project_name.firebase.com and project_name.web.app when app deployed. Thanks !
Try it!
In my case it's working
If localhost is already in the list of domains, make sure you're accessing your test app via http://localhost/ and not http://127.0.0.1/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.