mirror of
https://github.com/fastapi-users/fastapi-users.git
synced 2025-08-16 03:40:23 +08:00
Allow lifetime_seconds to be None to get session cookies
This commit is contained in:
@ -21,7 +21,7 @@ def token():
|
||||
data = {"aud": "fastapi-users:auth"}
|
||||
if user_id is not None:
|
||||
data["user_id"] = str(user_id)
|
||||
return generate_jwt(data, lifetime, SECRET, JWT_ALGORITHM)
|
||||
return generate_jwt(data, SECRET, lifetime, JWT_ALGORITHM)
|
||||
|
||||
return _token
|
||||
|
||||
|
Reference in New Issue
Block a user