如何使用 Google 帐户对我们网站中的用户进行身份验证 [英] How to authenticate our users in our website with Google Account

查看:33
本文介绍了如何使用 Google 帐户对我们网站中的用户进行身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在我们的网站上使用谷歌帐户验证用户.我希望用户被重定向到谷歌登录页面,然后将他重定向到我的网站.我想要这个在 PHP 中的实现.

How to authenticate a user using google account in our website. i want a user to be redirect to google login page and then redirect him to my website. I want this implementation in PHP.

推荐答案

可以使用 OpenID 完成身份验证.Google http://code.google.com/apis/中有详细的文档帐户/文档/OpenID.html

Authentication can be done using OpenID. A detailed document is there in Google http://code.google.com/apis/accounts/docs/OpenID.html

更新:Google 已弃用这些链接.请参阅以下链接以使用 Google 自己的 OAuth2 API 文档,而不是费心阅读库,因为它们非常复杂,最终可能会失去焦点.

Update: The links have been deprecated by Google. Refer to the following links to use Google's own OAuth2 API documentation instead of bothering so much into reading the libraries because they are very complicated and may end up losing focus.

这篇关于如何使用 Google 帐户对我们网站中的用户进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆