[damned-lies] Catch social auth exceptions and report as user messages



commit 1072c4b4158798ffe31a880c7005a15aebae413a
Author: Claude Paroz <claude 2xlibre net>
Date:   Thu Nov 8 09:01:31 2018 +0100

    Catch social auth exceptions and report as user messages

 damnedlies/settings.py | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/damnedlies/settings.py b/damnedlies/settings.py
index be46efbe..962e5bec 100644
--- a/damnedlies/settings.py
+++ b/damnedlies/settings.py
@@ -123,6 +123,7 @@ MIDDLEWARE = [
     'django.contrib.auth.middleware.AuthenticationMiddleware',
     'django.contrib.messages.middleware.MessageMiddleware',
     'django.middleware.clickjacking.XFrameOptionsMiddleware',
+    'social_django.middleware.SocialAuthExceptionMiddleware',
 ]
 
 ATOMIC_REQUESTS = True
@@ -157,6 +158,7 @@ INTERNAL_IPS=('127.0.0.1',)
 SITE_DOMAIN = 'l10n.gnome.org'
 
 LOGIN_REDIRECT_URL = '/'
+LOGIN_ERROR_URL = '/'  # Used by social_django
 
 SOCIAL_AUTH_USER_MODEL = 'people.Person'
 SOCIAL_AUTH_PIPELINE = (


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]