简体   繁体   English

我可以使用Google oauth2 id_token访问Google服务吗?

[英]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.

相关问题 在 Android 上使用 Google Play 服务的 OAuth2 令牌 - OAuth2 token with google play services on Android 我可以在Facebook或支持oauth2标准的其他服务中使用google-api-java-client库进行oauth2授权吗? - Can I use google-api-java-client library for oauth2 authorization in facebook or other services that support oauth2 standard? 使用来自不同平台的Google OAuth2令牌 - Use Google OAuth2 token from different platforms 错误:Google id_token 不允许与此应用程序一起使用。 Firebase 访问在工作后失败 - Error: Google id_token is not allowed to be used with this application. Firebase access fails after it was working Google Play服务-授予Oauth2权限 - Google Play Services - granting Oauth2 permission 如何使用Webview获取Google OAuth2令牌 - How to get Google OAuth2 Token with Webview Google OAuth2-访问令牌和刷新令牌-> invalid_grant /代码已被兑换 - Google OAuth2 - access token & refresh token -> invalid_grant/Code was already redeemed 除了Google以外,是否有OAuth2提供程序无需访问服务器即可提供访问令牌验证? - Any OAuth2 providers other than Google that offer access token validation without an extra server call? Android-无法使用OAuth访问令牌来检索Google阅读器供稿 - Android - unable to use OAuth access token to retrieve Google Reader feeds Android上的Google oauth2 - google oauth2 on android
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM