This commit is contained in:
2025-08-17 21:44:37 -03:00
parent 401a81afa0
commit 13f1479394
4 changed files with 5 additions and 6 deletions

View File

@@ -1,4 +1,3 @@
from datetime import timedelta
from http import HTTPStatus
from typing import Annotated
from uuid import uuid4
@@ -27,7 +26,6 @@ def session(
username: Annotated[str, Body()],
password: Annotated[str, Body()],
):
now_ = now()
user_id, password_hash = _get_user(username)
if not pbkdf2_sha256.verify(password, password_hash):
@@ -42,7 +40,7 @@ def session(
http_only=True,
secure=True,
same_site=None,
expires=now_ + timedelta(seconds=JWT_EXP_SECONDS),
max_age=JWT_EXP_SECONDS,
)
],
)