diff options
author | 2024-08-27 23:56:25 +0100 | |
---|---|---|
committer | 2024-08-27 23:56:25 +0100 | |
commit | 8fb10d50390d191c6fe749fa7acd37da56b17fb2 (patch) | |
tree | 18ae62d59a0194dd4d9d5615db8e18fe1aefb3bd | |
parent | make pw reset codes unique (diff) |
Update password meta data on password reset
-rw-r--r-- | thallium-backend/src/routes/login.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/thallium-backend/src/routes/login.py b/thallium-backend/src/routes/login.py index 8c2f1b3..3a4f6f1 100644 --- a/thallium-backend/src/routes/login.py +++ b/thallium-backend/src/routes/login.py @@ -67,6 +67,9 @@ async def reset_user_password(db: DBSession, reset_payload: PasswordReset) -> No raise generic_failure_error db_user.password_hash = ph.hash(reset_payload.new_password) + db_user.password_set_at = datetime.now(UTC) + db_user.require_password_change = False + db_user.password_reset_code = None @router.post("/user-login") |