Skip to content

Commit

Permalink
Fix two additional redirects missed in the previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
kszys committed Sep 24, 2024
1 parent 3172ff1 commit 58eef71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py4web/utils/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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):
Expand Down

0 comments on commit 58eef71

Please sign in to comment.