fix: complete IAM login after OIDC callback

This commit is contained in:
2026-09-08 13:34:18 +08:00
parent a5f4c4472d
commit bd0a3d3b96
301 changed files with 312 additions and 310 deletions
+3 -1
View File
@@ -229,7 +229,9 @@ const handleIamHubCodeLogin = async (code: string) => {
router.push('/bind-work-wechat')
return
}
redirectAfterLogin()
// OIDC 跨站回跳期间路由初始化可能尚未结束;完整重载可让权限守卫
// 使用刚持久化的本地 token 重新生成菜单,避免停留在登录 loading。
window.location.replace(import.meta.env.BASE_URL)
} catch (error: any) {
console.error('IAM Hub 登录失败:', error)
ElMessage.error(error?.msg || error?.message || '公司统一身份登录失败,请重新发起登录')