This commit is contained in:
Timothy Jaeryang Baek 2025-12-02 04:03:44 -05:00
parent 0a14196afb
commit 5388cc1bc6

View file

@ -235,7 +235,7 @@ async def invalidate_token(request, token):
jti = decoded.get("jti")
exp = decoded.get("exp")
if jti:
if jti and exp:
ttl = exp - int(
datetime.now(UTC).timestamp()
) # Calculate time-to-live for the token