From 0e4ad64bb30455fb1ae41ad27892267c1b9e6c67 Mon Sep 17 00:00:00 2001 From: Derrick Petzold Date: Sat, 18 Feb 2012 18:15:09 -1000 Subject: [PATCH] If the user was already logged in they would not be redirected to the corrent url if it was overriden in the session. --- social_auth/views.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/social_auth/views.py b/social_auth/views.py index 45140ee..fa703f1 100644 --- a/social_auth/views.py +++ b/social_auth/views.py @@ -147,6 +147,9 @@ def complete_process(request, backend, *args, **kwargs): if isinstance(user, HttpResponse): return user + if not user and request.user.is_authenticated(): + return HttpResponseRedirect(redirect_value) + if user: if getattr(user, 'is_active', True): login(request, user) -- 2.39.5