From: Derrick Petzold Date: Sun, 19 Feb 2012 04:15:09 +0000 (-1000) Subject: If the user was already logged in they would not be redirected to the corrent url... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=0e4ad64bb30455fb1ae41ad27892267c1b9e6c67;p=django-social-auth.git If the user was already logged in they would not be redirected to the corrent url if it was overriden in the session. --- 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)