firebase v3 - google 授权 "internal-error"

firebase v3 - google auth "internal-error"

我尝试使用 web-sdk 示例将我的 google-auth-only 项目从 firebase 2.x 迁移到 3.0: https://github.com/firebase/quickstart-js/blob/master/auth/google-redirect.html

在使用 apiKey(通过 Google-Developer-Console - 使用服务器选项)和所有其他需要的选项设置初始化代码后,我使用 "login with google"-按钮。 在此之后,出现重定向屏幕,然后重定向回起始页面并获得 "auth/internal-error".

有什么建议吗?

如果可能的话,我建议在 Firebase Console 中导入您的项目,而不是手动配置密钥,但请注意,在某些情况下这样做并不理想。

对于 API 键,尝试切换到 "Browser" 类型的键而不是 "Server" 类型的键,用于浏览器中的任何 运行,并确保它是批准用于您正在使用的域。

Google 登录也需要客户端 ID。最简单的实现方法是也使用 signInWithPopUp method, but there are instructions for manually configuring 和 Google 登录库。

如果您确实需要创建客户端 ID,可以在 Google Sign In documentation 中查看完整说明。