ASNE icon indicating copy to clipboard operation
ASNE copied to clipboard

Google Cross-client Identity

Open AlanVerbner opened this issue 10 years ago • 0 comments

Hello! First of all, thanks for a great lib! :)

We are trying to implement Cross-client Identity so we can use the same client_id in web and android apps. To do so, we need to send a special scope while doing login.

Normally, when you ask for an OAuth token, the person using the device sees a challenge, asking them if it’s OK to use their identity to get at some resource or other. But in this case, the system looks at the server-side Client ID in your scope argument, notices that it’s in the same project as your Android app, and gives you the token without pestering the user; they’ve already agreed to a relationship with you, the developer who controls that project. " Source

That being said, we need to send audience:server:client_id:X, where X is the Client ID of for the Web app.

As far as we could see, we cannot change the scope it's used while getting token

token = GoogleAuthUtil.getToken(params[0],
Plus.AccountApi.getAccountName(googleApiClient), scope);

Are you planning to add a way to do so? Do you want us to do a pull request?

AlanVerbner avatar Jan 09 '15 15:01 AlanVerbner