fix(auth): correct local cookie security configuration
This commit is contained in:
parent
b584e60273
commit
155fdbb16a
67 changed files with 1003 additions and 62 deletions
Binary file not shown.
Binary file not shown.
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue