Angularjs firebase身份验证域未经授权,即使在将域列入白名单后也是如此
我在Angular4项目中使用了Firebase Auth(Firebase 4.1.3),并启用了谷歌登录。在本地主机上工作时,一切正常。但是,当部署托管在Google app Engine上的我的应用程序时,身份验证弹出窗口会失败,并出现“auth/unauthorized domain”错误 如何在Firebase中将我的自定义域列入白名单? 已完成的检查:Angularjs firebase身份验证域未经授权,即使在将域列入白名单后也是如此,angularjs,google-app-engine,firebase,firebase-authentication,Angularjs,Google App Engine,Firebase,Firebase Authentication,我在Angular4项目中使用了Firebase Auth(Firebase 4.1.3),并启用了谷歌登录。在本地主机上工作时,一切正常。但是,当部署托管在Google app Engine上的我的应用程序时,身份验证弹出窗口会失败,并出现“auth/unauthorized domain”错误 如何在Firebase中将我的自定义域列入白名单? 已完成的检查: 我的firebase项目已启用并处于活动状态 在本地主机上使用弹出窗口进行Google登录 在Firebase控制台的Authent
{
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."
}
任何帮助都将不胜感激。好的,回答我自己的问题。我终于发现了问题:我正在部署一个旧版本的web应用程序。所以它永远不会以这种方式工作
如果对其他人有用,以上配置firebase Auth的步骤是正确和足够的 我接管了一个现有的项目,在使用错误的环境部署时遇到了这个错误。(域已在Firebase中正确设置)
ng构建--产品和firebase部署
在我的开发环境中部署时
我编写了部署脚本以避免此类错误
ng构建--配置“${ENV}”和&firebase部署
其中env var设置为脚本的参数