From: Matt Brown Date: Sun, 16 Jan 2011 02:11:07 +0000 (-0500) Subject: Modified the twitter backend to use the authenticate url instead of authorize. Fixed... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=5323f1fde2c6c5b8134a8a281b2d577cb60c2867;p=django-social-auth.git Modified the twitter backend to use the authenticate url instead of authorize. Fixed the default value for SOCIAL_AUTH_EXTRA_DATA. --- diff --git a/social_auth/backends.py b/social_auth/backends.py index 3c627dc..b5f66f5 100644 --- a/social_auth/backends.py +++ b/social_auth/backends.py @@ -95,7 +95,7 @@ class SocialAuthBackend(ModelBackend): def associate_auth(self, user, uid, response, details): """Associate a Social Auth with an user account.""" extra_data = '' if not getattr(settings, 'SOCIAL_AUTH_EXTRA_DATA', - False) \ + True) \ else self.extra_data(user, uid, response, details) return UserSocialAuth.objects.create(user=user, uid=uid, provider=self.name, diff --git a/social_auth/conf.py b/social_auth/conf.py index de6f42a..3c58348 100644 --- a/social_auth/conf.py +++ b/social_auth/conf.py @@ -3,7 +3,9 @@ TWITTER_SERVER = 'api.twitter.com' TWITTER_REQUEST_TOKEN_URL = 'https://%s/oauth/request_token' % TWITTER_SERVER TWITTER_ACCESS_TOKEN_URL = 'https://%s/oauth/access_token' % TWITTER_SERVER -TWITTER_AUTHORIZATION_URL = 'http://%s/oauth/authorize' % TWITTER_SERVER +# Note: oauth/authorize forces the user to authorize every time. +# oauth/authenticate uses their previous selection, barring revocation. +TWITTER_AUTHORIZATION_URL = 'http://%s/oauth/authenticate' % TWITTER_SERVER TWITTER_CHECK_AUTH = 'https://twitter.com/account/verify_credentials.json' # Facebook configuration