From a1d8eccc7e7e30313c1460961481c4389ce9d909 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9rome=20Maes?= Date: Mon, 11 Jan 2016 13:25:47 +0100 Subject: [PATCH] [FIX] auth_oauth : propagate the context in signin process --- addons/auth_oauth/res_users.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/auth_oauth/res_users.py b/addons/auth_oauth/res_users.py index cada7d51a26..1aa86ba2d50 100644 --- a/addons/auth_oauth/res_users.py +++ b/addons/auth_oauth/res_users.py @@ -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