Skip to content

Commit

Permalink
Fix token expiration time
Browse files Browse the repository at this point in the history
  • Loading branch information
koldakov committed Jan 25, 2024
1 parent bcf777a commit c167892
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/services/security.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from copy import deepcopy
from datetime import datetime, timedelta
from datetime import UTC, datetime, timedelta
from typing import List, Optional

from fastapi import HTTPException, Request, status
Expand Down Expand Up @@ -29,7 +29,7 @@ def generate_jwt_signature(

cleaned_payload.update(
{
"exp": datetime.now() + timedelta(seconds=expiration_time),
"exp": datetime.now(UTC) + timedelta(seconds=expiration_time),
}
)

Expand Down

0 comments on commit c167892

Please sign in to comment.