diff --git a/docs/configuration/django.rst b/docs/configuration/django.rst index 9fbe65749..a6b31f610 100644 --- a/docs/configuration/django.rst +++ b/docs/configuration/django.rst @@ -155,8 +155,30 @@ Exception processing is disabled if any of this settings is defined with a DEBUG = True +Django 1.6 +---------- + +Since this change `django@dc43fbc`_ Django enforces authentication backends to +be defined on ``AUTHENTICATION_BACKENDS`` setting, but ``python-social-auth`` +uses a wrapper (BackendWrapper_) in order to get access to the strategy which +is unknown to backends and application-dependent. + +The wrapper is not defined in ``AUTHENTICATION_BACKENDS`` and that breaks the +authentication flow, until a better solution is implementing (reducing the +coupling between the classes and easing access to strategies) this wrapper +**must** be added to ``AUTHENTICATION_BACKENDS`` setting like this:: + + AUTHENTICATION_BACKENDS = ( + # Social backends + ... + 'social.apps.django_app.utils.BackendWrapper', + ... + ) + .. _MongoEngine: http://mongoengine.org .. _MongoEngine Django integration: http://mongoengine-odm.readthedocs.org/en/latest/django.html .. _django-social-auth: https://github.com/omab/django-social-auth .. _Django built-in app: https://github.com/omab/python-social-auth/tree/master/social/apps/django_app .. _AUTHENTICATION_BACKENDS: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#authentication-backends +.. _django@dc43fbc: https://github.com/django/django/commit/dc43fbc2f21c12e34e309d0e8a121020391aa03a +.. _BackendWrapper: https://github.com/omab/python-social-auth/blob/master/social/apps/django_app/utils.py#L44 diff --git a/examples/django_example/example/settings.py b/examples/django_example/example/settings.py index e689640b9..486000579 100644 --- a/examples/django_example/example/settings.py +++ b/examples/django_example/example/settings.py @@ -171,6 +171,7 @@ 'social.backends.amazon.AmazonOAuth2', 'social.backends.email.EmailAuth', 'social.backends.username.UsernameAuth', + 'social.apps.django_app.utils.BackendWrapper', 'django.contrib.auth.backends.ModelBackend', )