小编Mov*_*ieZ的帖子

使用 Google OAuth2 时遇到问题(应用程序没有后端,因此只有客户端)

我正在尝试使用 OAuth 实现仅客户端登录。出现以下错误:

details: "You have created a new client application that uses libraries for user authentication or authorization that will soon be deprecated. New clients must use the new libraries instead; existing clients must also migrate before these libraries are deprecated. See the [Migration Guide](https://developers.google.com/identity/gsi/web/guides/gis-migration) for more information."
error: "idpiframe_initialization_failed"
Run Code Online (Sandbox Code Playgroud)

之后,每当我尝试登录时,都会收到以下错误:

error: "popup_closed_by_user"
[[Prototype]]: Object
Run Code Online (Sandbox Code Playgroud)

现在我正在 localhost:3000 上工作,所以我在 OAuth 2.0 客户端 ID 中添加了 http://localhost:3000 作为授权的 JS 源,还尝试将发布状态从测试更改为生产。用户类型设置为外部。

javascript google-oauth

15
推荐指数
2
解决办法
1万
查看次数

标签 统计

google-oauth ×1

javascript ×1