From 5388cc1bc65f55fe0f91806b20a5b711650d2d01 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Tue, 2 Dec 2025 04:03:44 -0500 Subject: [PATCH] refac --- backend/open_webui/utils/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/open_webui/utils/auth.py b/backend/open_webui/utils/auth.py index 3f05256c70..23fe517150 100644 --- a/backend/open_webui/utils/auth.py +++ b/backend/open_webui/utils/auth.py @@ -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