[英]How to auth my app with Google LogIn?
I have googled some info but still not undersant exactly how to auth my app with my server side. 我已经在Google上搜索了一些信息,但是仍然不能完全了解如何通过服务器端对我的应用进行身份验证。
I have Google LogIn button, as far as i understand when i click it, i sent request token, then i get back acsess token and can use it to get info from Google API, 我有Google登录按钮,据我了解,单击该按钮后,我发送了请求令牌,然后取回了acsess令牌,可以用它来从Google API获取信息,
but issue is what i should to do to auth the current user with my DB? 但是问题是我应该怎么做才能用数据库验证当前用户? It is ok that i get a acsess from google to use API, but what about my DB, what i should to do next, how i can concatenate it google logIn and my DB?
可以,我可以从Google获得使用API的权限,但是我的数据库该怎么办,下一步该怎么做,如何将其连接到Google登录名和我的数据库?
Could anybody help me to understand consept of auth and registration user in my DB with Google LogIn button? 有人可以通过Google登录按钮帮助我了解数据库中身份验证和注册用户的概念吗?
Well the basic concept is the following: 好吧,基本概念如下:
IdToken
IdToken
的选项的Google登录IdToken
userId
- you can use this userId to identify the user in your backend. userId
的有效负载-您可以使用此userId来标识后端中的用户。 Following a picture of the whole procedure described above: 以下是上述整个过程的图片:
这可能有助于您自己的oauth2服务器http://bshaffer.github.io/oauth2-server-php-docs/cookbook/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.