fix(auth): correct local cookie security configuration

This commit is contained in:
Schubert Ferenc 2026-07-11 15:50:15 +02:00
parent b584e60273
commit 155fdbb16a
67 changed files with 1003 additions and 62 deletions

View file

@ -18,6 +18,5 @@ def verify_password(password: str, password_hash: str) -> bool:
def create_access_token(subject: str, role: str) -> str:
expires_at = datetime.now(UTC) + timedelta(minutes=settings.access_token_minutes)
payload = {"sub": subject, "role": role, "exp": expires_at}
payload = {"sub": subject, "role": role, "iss": settings.app_name, "iat": datetime.now(UTC), "type": "access", "exp": expires_at}
return jwt.encode(payload, settings.jwt_secret, algorithm=settings.jwt_algorithm)