[FIX] auth_oauth : propagate the context in signin process
This commit is contained in:
parent
963edc634f
commit
a1d8eccc7e
|
@ -38,11 +38,11 @@ class res_users(osv.Model):
|
|||
def _auth_oauth_validate(self, cr, uid, provider, access_token, context=None):
|
||||
""" return the validation data corresponding to the access token """
|
||||
p = self.pool.get('auth.oauth.provider').browse(cr, uid, provider, context=context)
|
||||
validation = self._auth_oauth_rpc(cr, uid, p.validation_endpoint, access_token)
|
||||
validation = self._auth_oauth_rpc(cr, uid, p.validation_endpoint, access_token, context=context)
|
||||
if validation.get("error"):
|
||||
raise Exception(validation['error'])
|
||||
if p.data_endpoint:
|
||||
data = self._auth_oauth_rpc(cr, uid, p.data_endpoint, access_token)
|
||||
data = self._auth_oauth_rpc(cr, uid, p.data_endpoint, access_token, context=context)
|
||||
validation.update(data)
|
||||
return validation
|
||||
|
||||
|
@ -98,7 +98,7 @@ class res_users(osv.Model):
|
|||
# else:
|
||||
# continue with the process
|
||||
access_token = params.get('access_token')
|
||||
validation = self._auth_oauth_validate(cr, uid, provider, access_token)
|
||||
validation = self._auth_oauth_validate(cr, uid, provider, access_token, context=context)
|
||||
# required check
|
||||
if not validation.get('user_id'):
|
||||
# Workaround: facebook does not send 'user_id' in Open Graph Api
|
||||
|
|
Loading…
Reference in New Issue