如何获得新的谷歌标志的访问令牌与播放服务8.3? [英] How to get access token with new google sign in with play services 8.3?

查看:323
本文介绍了如何获得新的谷歌标志的访问令牌与播放服务8.3?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想切换到新的谷歌标志,在谷歌推出三合一服务8.3,因为它不要求获取账户的权限。但是,我无法在用户登录后获得访问令牌。

I'm trying to switch to the new google sign-in introduced in google play services 8.3 because it doesn't require the get accounts permission. However, I'm unable to get the access token after logging in the user.

有在GoogleSignInOptions.Builder一个requestIdToken(字符串clientServerId)方法,但是当我把从谷歌开发者控制台应用程序的OAuth 2客户端编号,它甚至没有用户登录。

There is a requestIdToken(String clientServerId) method in GoogleSignInOptions.Builder but when I put the Oauth 2 client Id of the app from google developer console, it doesn't even log in the user.

我使用了错误的ID为客户端服务器ID?

Am I using the wrong Id for the "client Server Id"?

推荐答案

请确保您使用的是Web客户端的客户端ID(您的OAuth服务器,应该是类型为Web应用程序),而不是Android客户端。

Make sure you are using the Client ID of the web client (your oauth server, should be of type "Web application"), not the Android client.

这篇关于如何获得新的谷歌标志的访问令牌与播放服务8.3?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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