fix(auth): 画框自动发起标记改60秒过期——身份源侧失败后同画框可自动重试
deploy-hxtesting / build-and-deploy (push) Successful in 1m8s
deploy-hxtesting / build-and-deploy (push) Successful in 1m8s
This commit is contained in:
1 parent
57adfe9c12
commit
893d9cd147
1 file changed
+6
-2
@@ -637,15 +637,19 @@ const loadOIDCConfig = async () => {
|
|||||||
// onMounted),登出后可再次自动发起;手动点 OIDC 按钮不受标记限制。
|
// onMounted),登出后可再次自动发起;手动点 OIDC 按钮不受标记限制。
|
||||||
// 2026-11-29 收窄(hxops 8c91c6e8 同款拍板):自动发起仅限画框场景(统一工作台嵌入,
|
// 2026-11-29 收窄(hxops 8c91c6e8 同款拍板):自动发起仅限画框场景(统一工作台嵌入,
|
||||||
// 判据=window.self !== window.top)——顶层直接访问 kbt 的用户不被强拽去身份源,停在本页自选。
|
// 判据=window.self !== window.top)——顶层直接访问 kbt 的用户不被强拽去身份源,停在本页自选。
|
||||||
|
// 2026-11-30 防循环标记改 60 秒过期(drawing 同款):此前一次性标记会让身份源侧失败
|
||||||
|
// (如应用 tags 限制)之后同标签重开画框永远不再自动发起,用户看似"还是不行"。
|
||||||
|
const triedAt = Number(sessionStorage.getItem('academy_sso_auto_tried') || 0)
|
||||||
|
const autoBlocked = triedAt > 0 && Date.now() - triedAt < 60_000
|
||||||
if (
|
if (
|
||||||
oidcEnabled.value &&
|
oidcEnabled.value &&
|
||||||
!authStore.isLoggedIn &&
|
!authStore.isLoggedIn &&
|
||||||
!inviteToken.value &&
|
!inviteToken.value &&
|
||||||
window.self !== window.top &&
|
window.self !== window.top &&
|
||||||
!new URLSearchParams(window.location.search).has('local') &&
|
!new URLSearchParams(window.location.search).has('local') &&
|
||||||
!sessionStorage.getItem('academy_sso_auto_tried')
|
!autoBlocked
|
||||||
) {
|
) {
|
||||||
sessionStorage.setItem('academy_sso_auto_tried', '1')
|
sessionStorage.setItem('academy_sso_auto_tried', String(Date.now()))
|
||||||
void handleOIDCLogin()
|
void handleOIDCLogin()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user