Firebase身份验证/未经授权的域。域未授权

use*_*355 9 firebase firebase-authentication google-cloud-functions

我正在尝试运行此示例 Firebase项目,但在浏览器控制台中始终出现此错误。

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."
Run Code Online (Sandbox Code Playgroud)

我已在身份验证->登录方法中启用了Google作为登录提供程序。

在此处输入图片说明

我想念什么吗?

一点指南会有所帮助。

我正在使用Firebase的免费计划。

小智 12

您需要将域mail-demo-fcm.firebaseapp.com添加到Firebase的“授权”域中的“身份验证”菜单中 在此处输入图片说明

  • 没有“授权域”部分。它直接跳到“高级” (3认同)
  • 转至授权 > 设置(顶部选项卡)> 域(左侧及下方)> 授权域 (2认同)

cDe*_*eke 12

授权域部分也可能位于设置页面中。这是一个屏幕截图: firebase 授权域的屏幕截图


Kis*_*nga 10

如果 localhost 已在域列表中,请确保您通过 http://localhost/ 而不是http://127.0.0.1/访问测试应用程序


小智 6

在登录方法部分下方,有一个授权域部分。我认为您需要在那里将您的域列入白名单。

  • 没有这样的部分。https://imgur.com/a/Igusaun (3认同)