diff options
author | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2014-06-14 04:38:14 -0300 |
---|---|---|
committer | Evgeny Fadeev <evgeny.fadeev@gmail.com> | 2014-06-14 04:38:14 -0300 |
commit | 350ea74f4ed0193be519d9d70d1b1d81ec6f2801 (patch) | |
tree | 57c2834206d12f65ca0ce4355addafb53fdbd2ba | |
parent | 4fbc07219c8dc4ac506d30cb191a2ac14f50c4e0 (diff) | |
parent | f701bb0808d1874a3eff20d167c412958d0a1db0 (diff) | |
download | askbot-350ea74f4ed0193be519d9d70d1b1d81ec6f2801.tar.gz askbot-350ea74f4ed0193be519d9d70d1b1d81ec6f2801.tar.bz2 askbot-350ea74f4ed0193be519d9d70d1b1d81ec6f2801.zip |
Merge pull request #206 from yongjhih/fb
Oauth2: Facebook: Fix email not found
-rw-r--r-- | askbot/deps/django_authopenid/util.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/askbot/deps/django_authopenid/util.py b/askbot/deps/django_authopenid/util.py index a63a13bc..586136d6 100644 --- a/askbot/deps/django_authopenid/util.py +++ b/askbot/deps/django_authopenid/util.py @@ -427,7 +427,8 @@ def get_enabled_major_login_providers(): 'resource_endpoint': 'https://graph.facebook.com/', 'icon_media_path': '/jquery-openid/images/facebook.gif', 'get_user_id_function': get_facebook_user_id, - 'response_parser': lambda data: dict(urlparse.parse_qsl(data)) + 'response_parser': lambda data: dict(urlparse.parse_qsl(data)), + 'scope': ['email',], } if askbot_settings.TWITTER_KEY and askbot_settings.TWITTER_SECRET: @@ -855,7 +856,7 @@ def get_oauth2_starter_url(provider_name, csrf_token): client_id=client_id, redirect_uri=redirect_uri ) - return client.auth_uri(state=csrf_token) + return client.auth_uri(state=csrf_token, scope=params['scope']) def ldap_check_password(username, password): |