【发布时间】:2013-08-22 04:25:16
【问题描述】:
我使用https://www.googleapis.com/auth/userinfo.email 范围来获取经过身份验证的用户的电子邮件地址。但是在进行身份验证时,Google 会提示用户:
应用希望:
- 了解您在 Google+ 上的身份(帮助图标显示:此应用正在请求将您与您的公开 Google 个人资料相关联的权限)
- 查看您的电子邮件地址
我不想要用户的 Google+ 相关信息。我正在使用OAuth2 authentication method。对于 Authsub 请求身份验证,它只需要访问电子邮件地址。如何单独访问用户的电子邮件地址?
【问题讨论】:
-
你需要的可能是 OpenID [OpenID 和 OAuth 的区别][1] [1]:stackoverflow.com/questions/1087031/…
-
你解决过这个问题吗? (相关:Why do you need to know who I know on Google? 在 Meta Stack Exchange 上。)
-
不幸的是,@zinking,谷歌is deprecating OpenID in April 2015。
-
虽然上面的问题比较老,但是Is there a way to only get a user's email address with Google's OAuth2 implementation?似乎有更多的答案。
标签: scope oauth-2.0 google-plus google-oauth google-authentication