feat(auth): complete sso subsystem integration

This commit is contained in:
mac
2026-07-16 15:52:56 +08:00
parent f8c389606f
commit eb2621d914
24 changed files with 1977 additions and 111 deletions
+2 -5
View File
@@ -4,8 +4,7 @@
<script setup lang="ts">
import { onMounted } from 'vue'
import { authApi } from '@/api/auth'
import { getToken, removeToken } from '@/utils/auth'
import { getToken } from '@/utils/auth'
import { redirectToSSO } from '@/utils/sso'
import { useAuthStore } from '@/stores/auth'
@@ -18,11 +17,9 @@ onMounted(async () => {
}
try {
const { data } = await authApi.getUserInfo()
authStore.setAuth(token, data)
await authStore.refreshUser()
} catch {
authStore.clearAuth()
removeToken()
redirectToSSO()
}
})