Authentication 我如何使用OAuth 2.0进行Google的身份验证?
代码太棒了。它给出了如何将OAuth 2与Google API结合使用的好例子。问题是我只想将OAuth 2用于身份验证,而不是用于授权。我在API中查找了一些仅进行身份验证的内容,但找不到正确的类 如何将Google PHP客户端配置为仅通过OAuth进行身份验证? 我考虑过只验证客户端(即,`$client->authenticate($\u GET['token']),但这并不理想,因为仍然要求用户授权访问不同的资源。我不想看到他们的电子邮件、图片等。我只想让谷歌确认他们是他们所说的人。好吧,不是为了认证 但是,大多数提供商都会让您有机会查询用户配置文件,因此您可以对用户进行身份验证。如果不访问他的个人资料数据,尤其是他的用户id,您就无法实现这一点Authentication 我如何使用OAuth 2.0进行Google的身份验证?,authentication,oauth-2.0,Authentication,Oauth 2.0,代码太棒了。它给出了如何将OAuth 2与Google API结合使用的好例子。问题是我只想将OAuth 2用于身份验证,而不是用于授权。我在API中查找了一些仅进行身份验证的内容,但找不到正确的类 如何将Google PHP客户端配置为仅通过OAuth进行身份验证? 我考虑过只验证客户端(即,`$client->authenticate($\u GET['token']),但这并不理想,因为仍然要求用户授权访问不同的资源。我不想看到他们的电子邮件、图片等。我只想让谷歌确认他们是他们所说的人。好
请参阅谷歌的文档以了解。如果您只想使用身份验证,则必须使用:OpenID/联合登录。
请参阅:Google API文档中有一节说“OAuth:Login”,这让我相信有一种方法可以仅将OAuth用于身份验证。