Skip to content

Commit

Permalink
access token info using id_token
Browse files Browse the repository at this point in the history
  • Loading branch information
Pramod Maurya committed Jan 18, 2017
1 parent 920ca3f commit 3b496ba
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion social_core/backends/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,15 @@ def auth_complete(self, *args, **kwargs):
return self.do_auth(response['access_token'],
response=response,
*args, **kwargs)
else:
elif 'id_token' in self.data: # Client-side workflow
token = self.data.get('id_token')
response = self.get_json(
'https://www.googleapis.com/oauth2/v3/tokeninfo',
params={'id_token': token}
)
self.process_error(response)
return self.do_auth(token, response=response, *args, **kwargs)
else:
raise AuthMissingParameter(self, 'access_token or code')


Expand Down

0 comments on commit 3b496ba

Please sign in to comment.