rauth icon indicating copy to clipboard operation
rauth copied to clipboard

Suggestion: GooglePlus OAuth ID Token handling

Open DavidHwu opened this issue 11 years ago • 1 comments

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.

DavidHwu avatar Feb 24 '15 18:02 DavidHwu

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']

josuebrunel avatar Jul 07 '15 08:07 josuebrunel