即使在将域列入白名单后,firebase 身份验证域也未获得授权

Leo*_*o T 7 google-app-engine angularjs firebase firebase-authentication

启用Google 登录的Angular4 项目中使用Firebase Auth (firebase 4.1.3) 。在本地主机上工作时,一切都按预期工作。但是,在部署托管在 Google App Engine 上的应用程序时,身份验证弹出窗口失败并显示“auth/unauthorized-domain”错误。

如何在 Firebase 中将我的自定义域列入白名单?

已经完成的检查:

  1. 我的 Firebase 项目已启用计费并处于活动状态
  2. 带有弹出窗口的 Google 登录可在本地主机上运行
  3. Google 应用引擎域已在 Firebase 控制台的 Authenticacion 模块中登录方法下的“授权域”中列入白名单。
  4. 在我的 angular 应用程序中仔细检查了 javascript firebase 配置(我复制粘贴了 firebase 控制台给出的代码段)。
  5. 在 Google Cloud Console 中,默认的 Web API 密钥没有访问限制,并且 OAuth 客户端 ID 已经在“授权的 JavaScript 源”列表和“授权的重定向 URI”(https://console)列表中包含我的 App Engine 域.developers.google.com/apis/credentials?project=MYPROJECT)。

其他一些类似的 SO 问题是指检查之前的内容,甚至在将新域列入白名单以允许更改传播后最多等待 20 分钟。但这些建议都不适合我。

注意:完整的错误代码

{
code: "auth/unauthorized-domain"
message: "This domain (PROJECT.appspot.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)

任何帮助,将不胜感激。