修复通用 OAuth 弹窗登录与账号关联并隔离迟到结果

This commit is contained in:
cieanyau committed 2026-11-07 08:21:42 +08:00
1 parent d330ad01cc
commit e27f08e36e
5 files changed
+690 -78

No files matched your search

+9 -1
View File
@@ -95,6 +95,14 @@ var D = {
}
}
}
// 授权弹窗完成后重新读取关联列表;成功提示只属于仍然存活的当前页面。
async function connect(provider) {
B.value = ``;
if ((await K(provider)) && J) {
B.value = `已关联账号`;
await Y();
}
}
// 仅对已关联的提供方执行解绑;请求完成后重新加载列表,以服务端结果为准。
async function X() {
if (U.value?.linked && !H.value && !W.value && J) {
@@ -314,7 +322,7 @@ var D = {
label: `关联账号`,
disabled:
unref(H) || unref(W) || unref(R),
onClick: (e) => unref(K)(t.name),
onClick: (e) => connect(t.name),
},
null,
8,
-3
View File
@@ -70,9 +70,6 @@ var w = {
);
if (n.kind === `login`) {
loginAttempt.commit(n.jwt);
try {
sessionStorage.removeItem(`console-oauth-pending`);
} catch {}
await navigateTo(`/`);
} else if (n.kind === `bind`) {
if (new URL(n.url).pathname === `/oauth/callback`)