Ere*_*evi 6 migration google-openid
我的网站曾经有一个链接,允许用户在 Open ID 2.0 中使用他们的 Google 帐户登录。自 2015 年 4 月 20 日起,这不再有效,因此我正在尝试迁移到 Google 登录。
此页面:https : //developers.google.com/identity/sign-in/web/sign-in#specify_your_apps_client_id
说:
使用 google-signin-client_id 元元素指定您在 Google Developers Console 中为您的应用程序创建的客户端 ID。
我不知道我的客户 ID 是什么。在我的 Google Developers Console 中:https : //console.developers.google.com/project
我只用 GoogleApp 创建了一个非常古老的应用程序,它与我所说的网站完全没有关系。无论如何,我尝试使用其项目 ID,但在单击登录按钮后出现以下错误:
401. That’s an error.
Error: invalid_client
The OAuth client was not found.
Request Details
fetch_basic_profile=true
scope=email profile openid
response_type=permission
redirect_uri=storagerelay://http/localhost?id=auth684995
ss_domain=http://localhost
client_id=imitatorgwt.apps.googleusercontent.com
openid.realm=
That’s all we know.
Run Code Online (Sandbox Code Playgroud)
我到底应该在 google-signin-client_id 元标记中写什么?
您需要创建/配置 Google OAuth 客户端。有关如何为 Google OpenID2 -> OpenID Connect 迁移执行此操作的详细说明,请查看Google 的迁移开发文档(特别是与 Google Developers Console 相关的部分)。
一个可能的工作流程是:
希望有帮助!
更新
我们已经更新了参考文档,其中包含有关如何创建 Google 项目+客户端 ID 的说明,请参阅https://developers.google.com/identity/sign-in/web/devconsole-project。这应该会让开发人员在未来更轻松。
再次感谢您报告问题!
| 归档时间: |
|
| 查看次数: |
7632 次 |
| 最近记录: |