diff --git a/apps/authentication/middleware.py b/apps/authentication/middleware.py index 9a55bdfa2..5b6d7c06f 100644 --- a/apps/authentication/middleware.py +++ b/apps/authentication/middleware.py @@ -78,9 +78,10 @@ class ThirdPartyLoginMiddleware(mixins.AuthMixin): 'redirect_url': reverse('authentication:login'), 'auto_redirect': True, } - response = render( - request, 'authentication/auth_fail_flash_message_standalone.html', context) + response = render(request, 'authentication/auth_fail_flash_message_standalone.html', context) else: + if not self.request.session['auth_confirm_required']: + return response guard_url = reverse('authentication:login-guard') args = request.META.get('QUERY_STRING', '') if args: