[Python-modules-commits] [python-social-auth] 15/89: Store access token in response if it does not exist
Wolfgang Borgert
debacle at moszumanska.debian.org
Sat Dec 24 15:15:12 UTC 2016
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to tag v0.2.15
in repository python-social-auth.
commit 557341d5561c13530644131b433f3b7a395155fb
Author: Kevin Chang <kevincgw at gmail.com>
Date: Thu Jan 7 15:47:28 2016 -0800
Store access token in response if it does not exist
`BaseOAuth2.do_auth` wasn't storing the access token to be passed to the pipeline. As a result, backends inheriting from `BaseOAuth2` wasn't storing the token because `OAuthAuth.extra_data` never had the token information passed to it.
---
social/backends/oauth.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/social/backends/oauth.py b/social/backends/oauth.py
index b6d7abb..b2210ec 100644
--- a/social/backends/oauth.py
+++ b/social/backends/oauth.py
@@ -392,6 +392,8 @@ class BaseOAuth2(OAuthAuth):
data = self.user_data(access_token, *args, **kwargs)
response = kwargs.get('response') or {}
response.update(data or {})
+ if 'access_token' not in response:
+ response['access_token'] = access_token
kwargs.update({'response': response, 'backend': self})
return self.strategy.authenticate(*args, **kwargs)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-social-auth.git
More information about the Python-modules-commits
mailing list