Изменил время жизни куки

This commit is contained in:
urec56 2024-02-11 16:38:58 +03:00
parent b4d26dae90
commit 3c799bb2ec

View file

@ -30,7 +30,7 @@ def verify_password(plain_password: str, hashed_password: str) -> bool:
# Функция создания JWT токена
def create_access_token(data: dict) -> str:
to_encode = data.copy()
expire = datetime.utcnow() + timedelta(minutes=30)
expire = datetime.utcnow() + timedelta(minutes=60)
to_encode.update({"exp": expire})
encoded_jwt = jwt.encode(
to_encode, settings.SECRET_KEY, settings.ALGORITHM