update
This commit is contained in:
parent
78f0e9dd84
commit
61603f1981
@ -15,6 +15,8 @@ def create_access_token(data: dict, expires_delta: Optional[timedelta] = None) -
|
||||
to_encode.update({"exp": datetime.now(timezone.utc) + expires_delta})
|
||||
else:
|
||||
to_encode.update({"exp": datetime.now(timezone.utc) + timedelta(days=180)})
|
||||
|
||||
print(to_encode)
|
||||
|
||||
encoded_jwt = jwt.encode(to_encode, settings.SECRET_KEY, algorithm="HS256")
|
||||
return encoded_jwt
|
||||
|
||||
Loading…
Reference in New Issue
Block a user