Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: GooglePlus OAuth ID Token handling #177

Open
DavidHwu opened this issue Feb 24, 2015 · 1 comment
Open

Suggestion: GooglePlus OAuth ID Token handling #177

DavidHwu opened this issue Feb 24, 2015 · 1 comment

Comments

@DavidHwu
Copy link

GooglePlus needs to have the ID token to be exchanged for the userinfo per
https://developers.google.com/accounts/docs/OpenIDConnect#exchangecode

While I was able to do this in my code with and persist this through my own provided decoder.
It would be great to have a more integrated RAuth way to do this.
Expand the RAuth example to support GooglePlus via OAuth and you can see my data points.

In the decoder, I have to intercept 'id_token' returned by GooglePlus and persist this through a session.get().json() to exchange this for a valid user info.

While this isn't hard once I had figured out how to replace default decoder which doesn't work in GooglePlus, I am merely suggesting that we may provide a better example and blessed workflow via RAuth.

@josuebrunel
Copy link

Hello @DavidHwu , i think the get_raw_acess_token is the method to use in this case ( sure you did so ). So it kind of really look like a rauth way to do things, doesn't it ?
Example with OAuth2

raw_access = service.get_raw_access_token(data={"code": verifier, 'redirect_uri': callback_uri,'grant_type':'authorization_code'}, headers=headers)
parsed_access = json.loads(raw_access.content.decode('utf-8'))
access_token = parsed_access['access_token']
token_type = parsed_access['token_type']
refresh_token = parsed_access['refresh_token']

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants