[英]Can I use Google oauth2 id_token to access Google services
I implemented this: http://android-developers.blogspot.fi/2013/01/verifying-back-end-calls-from-android.html and then wanted to make the app ask the full name of the user from google servers. 我实现了这个: http : //android-developers.blogspot.fi/2013/01/verifying-back-end-calls-from-android.html然后想让应用程序从谷歌服务器询问用户的全名。
I can get the id_token all right, pass it to the backend, verify it and get the user id and email from the token, but I don't seem to be able to find any way to turn the id_token to a token I could use to authenticate on google servers and request personal info from the profile scope. 我可以将id_token改为正确,将其传递给后端,验证它并从令牌获取用户ID和电子邮件,但我似乎无法找到任何方法将id_token转换为我可以使用的令牌在Google服务器上进行身份验证,并从配置文件范围请求个人信息。 The google apps-app has the permissions to use the scopes, so as soon as I can understand how to get an auth-token, asking the info shouldn't be a problem. 谷歌应用程序应用程序具有使用范围的权限,所以一旦我能够理解如何获取身份验证令牌,询问信息应该不是问题。
Is it at all possible to access the google servers with this token, or must I ask for a separate auth token for the personal info. 是否可以使用此令牌访问Google服务器,或者我是否必须为个人信息请求单独的身份验证令牌。
You should ask for a separate auth token for the personal info. 您应该为个人信息要求单独的身份验证令牌。 The user has to explicitly grant permission for your app to see things like their name, gender, etc. 用户必须明确授予您的应用权限,以便查看其姓名,性别等内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.