1

I'm struggling to set up django-social-auth on my app. Whenever I hit http://<* domain here *>/social/login/twitter/ I get an error page saying 'Incorrect authentication service "twitter"' with the exception "WrongBackend".

Here are is my settings.py:

INSTALLED_APPS = (
    'django.contrib.auth',
    <* omitted code *>
    'social_auth',
)

AUTHENTICATION_BACKENDS = (
    'social_auth.backends.twitter.TwitterBackend',
    'django.contrib.auth.backends.ModelBackend',
)

TEMPLATE_CONTEXT_PROCESSORS = (
    "django.contrib.auth.context_processors.auth",
    <* omitted code *>
    'social_auth.context_processors.social_auth_by_type_backends',
    'social_auth.context_processors.social_auth_login_redirect',
)

LOGIN_URL = '/auth/login/'
LOGIN_REDIRECT_URL = '/account/'
LOGIN_ERROR_URL = '/auth/login/error/'

TWITTER_CONSUMER_KEY = '<* omitted code *>'
TWITTER_CONSUMER_SECRET = '<* omitted code *>'

and my URLs

urlpatterns = patterns('',
    <* omitted code *>
    url(r'social/', include('social_auth.urls')),
)

Am I missing anything obvious on this one?

m1ket
  • 388
  • 1
  • 12
  • everything looks right. can you just change the order of the backends ? – karthikr Jun 01 '13 at 16:51
  • Unfortunately that hasn't worked. Bit worrying that you also think everything looks right because I do too. – m1ket Jun 01 '13 at 16:57
  • Did you look at this [QA](http://stackoverflow.com/a/6247743/1097972)? – iraycd Jun 01 '13 at 18:58
  • 2
    Yea I did. However, I solved this myself in the end. The answer is unknown. I tweaked a lot. Even went to the extent of localising a copy of the code. Eventually something worked. I hate it when things like that happen. Closing this question. – m1ket Jun 01 '13 at 19:03

0 Answers0