refactor(auth): ♻️ 重构认证逻辑,分离登录跳转与token刷新

This commit is contained in:
Ray.Hao
2025-09-23 15:55:13 +08:00
parent 1ed5c03568
commit 6979a175ee
8 changed files with 144 additions and 90 deletions

View File

@@ -34,6 +34,21 @@ export const defaultSettings: AppSettings = {
sidebarColorScheme: SidebarColor.CLASSIC_BLUE,
};
/**
* 认证功能配置
*/
export const authConfig = {
/**
* Token自动刷新开关
*
* true: 启用自动刷新 - ACCESS_TOKEN_INVALID时尝试刷新token
* false: 禁用自动刷新 - ACCESS_TOKEN_INVALID时直接跳转登录页
*
* 适用场景后端没有刷新接口或不需要自动刷新的项目可设为false
*/
enableTokenRefresh: true,
} as const;
// 主题色预设 - 经典配色方案
// 注意:修改默认主题色时,需要同步修改 src/styles/variables.scss 中的 primary.base 值
export const themeColorPresets = [