0

I've got django-social-auth working well with Facebook and Google however every time a Twitter user logs in it prompts them to authorize my app. It seems like the tokens may be expiring almost immediately.

Any ideas on what might be causing this?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Chris Hayes
  • 151
  • 4

1 Answers1

0

If I were you I will start like this:

  1. Check you included the aprropriate backend

    AUTHENTICATION_BACKENDS = ( 'social_auth.backends.twitter.TwitterBackend',)

  2. Go to dev.twitter.com and recheck everything in the app's configuration

2. In settings.py add the following parameter

 SOCIAL_AUTH_SESSION_EXPIRATION = False 
  1. Try to recreate the bug
  2. Check the tables:
    • social_auth_usersocialauth
    • django_session

The first table must contain an entry with the tokens and the other a non expiring session. This might give you more information about the doings.

jdcaballerov
  • 1,452
  • 1
  • 12
  • 16
  • All of those items checked out, I've now implemented Google-Oauth2 as well and am having similar problems with immediate expiration of the token. – Chris Hayes Sep 22 '12 at 23:25
  • @ChrisHayes weird. I am using this oauth2==1.5.211 , django-social-auth==0.7.5 without any problem. – jdcaballerov Sep 23 '12 at 10:24