Search code examples
pythondjangopython-2.7python-social-auth

DJANGO: No module named social_auth.backends.contrib.github


I had this error when I tried to sign in using github auth backend

No module named social_auth.backends.contrib.github

settings.py

AUTHENTICATION_BACKENDS = (
    'social_auth.backends.contrib.github.GithubBackend',
    'django.contrib.auth.backends.ModelBackend',
)

Solution

  • It should be

    AUTHENTICATION_BACKENDS = (
        'django.contrib.auth.backends.ModelBackend',
        'social.backends.github.GithubOAuth2',
    )
    

    for python-social-auth