feat(auth): 重构统一认证并支持平级服务无感登录
This commit is contained in:
1 parent
d79def5519
commit
ca312ea751
64 files changed
+3713
-449
No files matched your search
@@ -62,7 +62,10 @@ watch(themePreference, (newTheme) => {
|
||||
updateThemePreference(newTheme);
|
||||
});
|
||||
|
||||
const onUnauthorized = () => {
|
||||
const onUnauthorized = (event: Event) => {
|
||||
const url = String((event as CustomEvent<{ url?: string }>).detail?.url || '');
|
||||
// 外部应用目录是可选导航能力,加载失败只能隐藏入口,不能清除有效 HXOPS 登录态。
|
||||
if (/\/api\/sso\/apps(?:\?|$)/.test(url)) return;
|
||||
showMessageDialog('error', '认证已过期或无效,请重新登录');
|
||||
logoutAuth();
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user