gorbin / gorbin/ASNE

Google Cross-client Identity

Open
#64 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
877
Forks
225
PR merge metrics
No merged PRs in 30d

Description

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

We are trying to implement [Cross-client Identity](https://developers.google.com/accounts/docs/CrossClientAuth) 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](http://android-developers.blogspot.it/2013/01/verifying-back-end-calls-from-android.html)

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

``` java
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.