Skip to content

Commit

Permalink
Modified the twitter backend to use the authenticate url instead of a…
Browse files Browse the repository at this point in the history
…uthorize. Fixed the default value for SOCIAL_AUTH_EXTRA_DATA.
  • Loading branch information
mattucf committed Jan 16, 2011
1 parent 6ce16af commit 5323f1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion social_auth/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def get_random_username():
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,
Expand Down
4 changes: 3 additions & 1 deletion social_auth/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5323f1f

Please sign in to comment.