diff --git a/passbook/core/auth/view.py b/passbook/core/auth/view.py index e591b33cc..ceb961349 100644 --- a/passbook/core/auth/view.py +++ b/passbook/core/auth/view.py @@ -121,5 +121,5 @@ class AuthenticationView(UserPassesTestMixin, View): del self.request.session[key] LOGGER.debug("Cleaned up sessions") -class MFAPermissionDeniedView(PermissionDeniedView): +class FactorPermissionDeniedView(PermissionDeniedView): """User could not be authenticated""" diff --git a/passbook/core/urls.py b/passbook/core/urls.py index 1c1fcd75a..6b2092e46 100644 --- a/passbook/core/urls.py +++ b/passbook/core/urls.py @@ -21,7 +21,7 @@ core_urls = [ path('auth/sign_up/', authentication.SignUpView.as_view(), name='auth-sign-up'), path('auth/process/', view.AuthenticationView.as_view(), name='auth-process'), path('auth/process//', view.AuthenticationView.as_view(), name='auth-process'), - path('auth/process/denied/', view.MFAPermissionDeniedView.as_view(), name='auth-denied'), + path('auth/process/denied/', view.FactorPermissionDeniedView.as_view(), name='auth-denied'), # User views path('user/', user.UserSettingsView.as_view(), name='user-settings'), path('user/delete/', user.UserDeleteView.as_view(), name='user-delete'), diff --git a/passbook/core/views/authentication.py b/passbook/core/views/authentication.py index 14c2bbd21..cb4466ace 100644 --- a/passbook/core/views/authentication.py +++ b/passbook/core/views/authentication.py @@ -65,7 +65,7 @@ class LoginView(UserPassesTestMixin, FormView): if AuthenticationView.SESSION_FACTOR in self.request.session: del self.request.session[AuthenticationView.SESSION_FACTOR] self.request.session[AuthenticationView.SESSION_PENDING_USER] = pre_user.pk - return redirect(reverse('passbook_core:mfa')) + return redirect(reverse('passbook_core:auth-process')) def invalid_login(self, request: HttpRequest, disabled_user: User = None) -> HttpResponse: """Handle login for disabled users/invalid login attempts"""