oauth - 随着 Google+ 被关闭,OAuth API 是否也消失了?
问题描述
我们的一些用户通过 Google OAuth API ( https://developers.google.com/+/web/api/rest/oauth )进行身份验证
2019 年 4 月之后 Google 的 OAuth API 版本的未来是什么?
除了 OAuth,我们使用以下端点来获取用户的电子邮件和姓名:一旦我们获得访问令牌,我们就会使用https://www.googleapis.com/plus/v1/people/me 。这个端点会过时吗?
解决方案
2018 年 12 月 21 日更新
[结束更新]
OAuth 2.0 是 Google Accounts 提供的一项服务。Google+ 的生命周期结束不会影响 OAuth 2.0。
OAuth 2.0 是 Google Cloud Platform、G Suite 和许多其他服务的基础认证服务。OAuth 2.0 基于令牌,这些令牌可用于各种服务,包括基于 Google 的服务和第三方服务。
下面在关于端点的评论部分提出了另一个问题。
用于用户信息的 Google+ 端点:googleapis.com/plus/v1/people/me可能会继续存在多年(等待 Google 的官方公告)。
我将开始使用 Google OAuth 2.0 端点(注意 alt=json):https ://www.googleapis.com/oauth2/v3/userinfo?alt=json
返回的 Json 如下所示:
{
"id": "123456789012345678901",
"email": "username@example.com",
"verified_email": true,
"name": "User Name",
"given_name": "User",
"family_name": "Name",
"link": "https://plus.google.com/123456789012345678901",
"picture": "https://lh3.googleusercontent.com/.../mo/photo.jpg",
"locale": "en",
"hd": "example.com"
}
当前的 Google OAuth 2.0 端点列表:
https://accounts.google.com/.well-known/openid-configuration
推荐阅读
- r - xaringan:改变纵横比的简单方法?
- excel - Excel 连续查找第二个实例的列引用
- java - 当 application.properties 中没有对应的嵌套键/值对时,Spring Boot 为嵌套配置绑定初始化新实例
- php - 查看表 IF CASE 条件不能正常工作
- typo3 - 为什么我的 DataProcessing\MenuProcessor 没有为我的页面树显示 level-3 和 level-4
- java - 从 ile RPG 调用 Java set 和 get 方法
- html - 是否有允许使用当前 div 大小的 CSS 属性?
- azure-service-fabric - 本地 5 节点 Service Fabric 群集上的“由于名称重复而无法在网络上创建终结点 [XXX]”
- asp.net-core - “CspKeyContainerInfo”需要 Windows 加密 API (CAPI),此平台上不可用
- javascript - 访问 Azure Active Directory 时模拟登录用户