]> git.parisson.com Git - django-social-auth.git/commitdiff
Add missing 'auth' arguments before authenticate. Refs #255
authorMatías Aguirre <matiasaguirre@gmail.com>
Thu, 16 Feb 2012 20:39:40 +0000 (18:39 -0200)
committerMatías Aguirre <matiasaguirre@gmail.com>
Thu, 16 Feb 2012 20:39:40 +0000 (18:39 -0200)
social_auth/backends/browserid.py
social_auth/backends/contrib/github.py
social_auth/backends/facebook.py

index a8774b59e8bc06891ea08d4379fa7d03f486de1d..ca038c447d580af931ee575afe096d72cdba583c 100644 (file)
@@ -78,6 +78,7 @@ class BrowserIDAuth(BaseAuth):
                 raise ValueError('Authentication failed')
 
             kwargs.update({
+                'auth': self,
                 'response': response,
                 self.AUTH_BACKEND.name: True
             })
index b866ca35979f785c28e375e09935aad8f1b25853..269810d49aacc52c6fa76799f068a3318177eaf6 100644 (file)
@@ -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'
index 108315ac4c7f364fbee330e12eeace4d9c69f02b..70f87988b9ef4dfeeea524d885a043d9a68d03f3 100644 (file)
@@ -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'