diff --git a/backend/common/security/jwt.py b/backend/common/security/jwt.py index 295455873..296f09100 100644 --- a/backend/common/security/jwt.py +++ b/backend/common/security/jwt.py @@ -294,7 +294,7 @@ async def jwt_authentication(token: str) -> GetUserInfoWithRelationDetail: user = GetUserInfoWithRelationDetail(**select_as_dict(current_user)) await redis_client.setex( f'{settings.JWT_USER_REDIS_PREFIX}:{user_id}', - settings.JWT_USER_REDIS_EXPIRE_SECONDS, + settings.TOKEN_EXPIRE_SECONDS, user.model_dump_json(), ) else: diff --git a/backend/core/conf.py b/backend/core/conf.py index 390d14f45..10a3fbbe0 100644 --- a/backend/core/conf.py +++ b/backend/core/conf.py @@ -75,7 +75,6 @@ class Settings(BaseSettings): # JWT JWT_USER_REDIS_PREFIX: str = 'fba:user' - JWT_USER_REDIS_EXPIRE_SECONDS: int = 60 * 60 * 24 * 7 # 7 天 # RBAC RBAC_ROLE_MENU_MODE: bool = True