From: Matías Aguirre Date: Thu, 16 Feb 2012 20:39:40 +0000 (-0200) Subject: Add missing 'auth' arguments before authenticate. Refs #255 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=52687eaf2a0038b2f4f2ec344b85c39015edf5a6;p=django-social-auth.git Add missing 'auth' arguments before authenticate. Refs #255 --- diff --git a/social_auth/backends/browserid.py b/social_auth/backends/browserid.py index a8774b5..ca038c4 100644 --- a/social_auth/backends/browserid.py +++ b/social_auth/backends/browserid.py @@ -78,6 +78,7 @@ class BrowserIDAuth(BaseAuth): raise ValueError('Authentication failed') kwargs.update({ + 'auth': self, 'response': response, self.AUTH_BACKEND.name: True }) diff --git a/social_auth/backends/contrib/github.py b/social_auth/backends/contrib/github.py index b866ca3..269810d 100644 --- a/social_auth/backends/contrib/github.py +++ b/social_auth/backends/contrib/github.py @@ -76,7 +76,11 @@ class GithubAuth(BaseOAuth): error = self.data.get('error') or 'unknown error' raise ValueError('Authentication error: %s' % error) data['access_token'] = access_token - kwargs.update({'response': data, GithubBackend.name: True}) + kwargs.update({ + 'auth': self, + 'response': data, + GithubBackend.name: True + }) return authenticate(*args, **kwargs) else: error = self.data.get('error') or 'unknown error' diff --git a/social_auth/backends/facebook.py b/social_auth/backends/facebook.py index 108315a..70f8798 100644 --- a/social_auth/backends/facebook.py +++ b/social_auth/backends/facebook.py @@ -93,7 +93,11 @@ class FacebookAuth(BaseOAuth2): # premission was requested if 'expires' in response: data['expires'] = response['expires'][0] - kwargs.update({'response': data, self.AUTH_BACKEND.name: True}) + kwargs.update({ + 'auth': self, + 'response': data, + self.AUTH_BACKEND.name: True + }) return authenticate(*args, **kwargs) else: error = self.data.get('error') or 'unknown error'