Allow lifetime_seconds to be None to get session cookies

This commit is contained in:
François Voron
2021-03-19 18:19:58 +01:00
parent 902bcdb8d2
commit ef4a54c204
10 changed files with 20 additions and 15 deletions

View File

@ -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