Изменил время жизни куки
This commit is contained in:
parent
b4d26dae90
commit
3c799bb2ec
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ def verify_password(plain_password: str, hashed_password: str) -> bool:
|
||||||
# Функция создания JWT токена
|
# Функция создания JWT токена
|
||||||
def create_access_token(data: dict) -> str:
|
def create_access_token(data: dict) -> str:
|
||||||
to_encode = data.copy()
|
to_encode = data.copy()
|
||||||
expire = datetime.utcnow() + timedelta(minutes=30)
|
expire = datetime.utcnow() + timedelta(minutes=60)
|
||||||
to_encode.update({"exp": expire})
|
to_encode.update({"exp": expire})
|
||||||
encoded_jwt = jwt.encode(
|
encoded_jwt = jwt.encode(
|
||||||
to_encode, settings.SECRET_KEY, settings.ALGORITHM
|
to_encode, settings.SECRET_KEY, settings.ALGORITHM
|
||||||
|
|
Loading…
Add table
Reference in a new issue