SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/account-disconnected-redirect-url/'
+ Users will be redirected to ``LOGIN_ERROR_URL`` in case of error or user
+ cancellation on some backends. This URL can be override by this setting::
+
+ SOCIAL_AUTH_BACKEND_ERROR_URL = '/new-error-url/'
+
In case of authentication error, the message can be stored in session
if the following setting is defined::
It's default value is ``DEBUG``, so you need to set it to ``False`` to avoid
tracebacks when ``DEBUG = True``.
+
+Some settings can be tweak by backend by adding the backend name prefix (all
+uppercase and replace ``-`` with ``_``), here's the supported settings so far::
+
+ LOGIN_ERROR_URL
+ SOCIAL_AUTH_BACKEND_ERROR_URL
+ SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL
+ SOCIAL_AUTH_DISCONNECT_REDIRECT_URL
+ SOCIAL_AUTH_NEW_USER_REDIRECT_URL
+ SOCIAL_AUTH_LOGIN_REDIRECT_URL
+ SOCIAL_AUTH_INACTIVE_USER_URL
+
+
Authentication Pipeline
-----------------------
SOCIAL_AUTH_DISCONNECT_REDIRECT_URL = '/account-disconnected-redirect-url/'
+ Users will be redirected to ``LOGIN_ERROR_URL`` in case of error or user
+ cancellation on some backends. This URL can be override by this setting::
+
+ SOCIAL_AUTH_BACKEND_ERROR_URL = '/new-error-url/'
+
In case of authentication error, the message can be stored in session
if the following setting is defined::
It's default value is ``DEBUG``, so you need to set it to ``False`` to avoid
tracebacks when ``DEBUG = True``.
+Some settings can be tweak by backend by adding the backend name prefix (all
+uppercase and replace ``-`` with ``_``), here's the supported settings so far::
+
+ LOGIN_ERROR_URL
+ SOCIAL_AUTH_BACKEND_ERROR_URL
+ SOCIAL_AUTH_NEW_ASSOCIATION_REDIRECT_URL
+ SOCIAL_AUTH_DISCONNECT_REDIRECT_URL
+ SOCIAL_AUTH_NEW_USER_REDIRECT_URL
+ SOCIAL_AUTH_LOGIN_REDIRECT_URL
+ SOCIAL_AUTH_INACTIVE_USER_URL
+
+
.. _Model Manager: http://docs.djangoproject.com/en/dev/topics/db/managers/#managers
.. _Login URL: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#login-url
.. _Login redirect URL: http://docs.djangoproject.com/en/dev/ref/settings/?from=olddocs#login-redirect-url
# Remove possible redirect URL from session, if this is a new
# account, send him to the new-users-page if defined.
- new_user_redirect = setting('SOCIAL_AUTH_NEW_USER_REDIRECT_URL')
+ new_user_redirect = backend_setting(backend,
+ 'SOCIAL_AUTH_NEW_USER_REDIRECT_URL')
if new_user_redirect and getattr(user, 'is_new', False):
url = new_user_redirect
else:
- url = redirect_value or DEFAULT_REDIRECT
+ url = redirect_value or \
+ backend_setting('SOCIAL_AUTH_LOGIN_REDIRECT_URL') or \
+ DEFAULT_REDIRECT
else:
url = backend_setting(backend, 'SOCIAL_AUTH_INACTIVE_USER_URL',
LOGIN_ERROR_URL)