Commit 597f2009 authored by Gabriel Monnerat's avatar Gabriel Monnerat

fixup! erp5_oauth_google_login: Implementation of login in ERP5 with Google Account

We are expecting user_id instead of username
parent 1fb9ae2b
......@@ -20,7 +20,7 @@ elif code is not None:
if response_dict is not None:
access_token = response_dict['access_token'].encode('utf-8')
response_dict['login'] = context.ERP5Site_getGoogleUserId(access_token)
response_dict['user_id'] = portal.portal_membership.getAuthenticatedMember().getUserName()
response_dict['user_id'] = portal.portal_membership.getAuthenticatedMember().getUserId()
hash_str = context.Base_getHMAC(access_token, access_token)
context.REQUEST.RESPONSE.setCookie('__ac_google_hash', hash_str, path='/')
context.Base_setBearerToken(hash_str,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment