From 4c447aa648f5d6ffd71ab72960242ca9ca1067c3 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Mon, 9 Jun 2025 11:52:48 +0800 Subject: [PATCH] perf: jwt token expire time change to 7 days --- astrbot/dashboard/routes/auth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/dashboard/routes/auth.py b/astrbot/dashboard/routes/auth.py index 639adb709..2eea1508c 100644 --- a/astrbot/dashboard/routes/auth.py +++ b/astrbot/dashboard/routes/auth.py @@ -78,7 +78,7 @@ class AuthRoute(Route): def generate_jwt(self, username): payload = { "username": username, - "exp": datetime.datetime.utcnow() + datetime.timedelta(days=30), + "exp": datetime.datetime.utcnow() + datetime.timedelta(days=7), } token = jwt.encode(payload, WEBUI_SK, algorithm="HS256") return token