修复本地开发不走统一登陆

This commit is contained in:
hero920103 committed 2026-09-29 11:10:42 +08:00
1 parent c49e8d0d3f
commit 1685b22e1e
12 files changed
+161 -139

No files matched your search

+4 -5
View File
@@ -1,7 +1,7 @@
import { defineStore } from 'pinia'
import { ref, reactive } from 'vue'
import { getCurrentUser } from '@/api/login'
import { isSSOEnabled, logoutSSO } from '@/utils/authClient'
import { logoutSSO } from '@/utils/authClient'
// 用户信息类型
const defaultUser = {
@@ -94,10 +94,9 @@ export const useAuthStore = defineStore('auth', () => {
Object.assign(user, defaultUser)
localStorage.removeItem('token')
localStorage.removeItem('userInfo')
// 统一认证模式:吊销令牌并跳认证中心完成单点登出(所有调用点自动生效)
if (isSSOEnabled()) {
logoutSSO()
}
// 统一认证:吊销令牌并跳认证中心完成单点登出(所有调用点自动生效,
// 调用方不要再 router.push('/login'),本地登录页已下线)
logoutSSO()
}
// 检查认证状态