From 58eef71759d659a3a2a4c0c38e1218f6791d1e9f Mon Sep 17 00:00:00 2001 From: Krzysztof SOCHA Date: Tue, 24 Sep 2024 18:34:49 +0200 Subject: [PATCH] Fix two additional redirects missed in the previous commit --- py4web/utils/auth.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py4web/utils/auth.py b/py4web/utils/auth.py index bdc625ce..1e0c62a9 100644 --- a/py4web/utils/auth.py +++ b/py4web/utils/auth.py @@ -1644,7 +1644,7 @@ def login(self, model=False): ): self.auth.session["auth.2fa_user"] = user["id"] self.auth.session["auth.2fa_next_url"] = next_url - redirect(URL("auth", "two_factor")) + redirect(URL(f"{self.auth.route}/two_factor")) self.auth.store_user_in_session(user["id"]) self._postprocessing("login", form, user) @@ -1730,7 +1730,7 @@ def two_factor(self): self._set_flash( self.auth.param.messages["errors"]["two_factor_max_tries"] ) - redirect(URL("auth", "login", vars=dict(next=next_url))) + redirect(URL(f"{self.auth.route}/login", vars=dict(next=next_url))) return form def request_reset_password(self, model=False):