修改登陆及后续逻辑,统一使用一个逻辑

This commit is contained in:
QLHazyCoder
2026-04-26 05:22:36 +08:00
parent ef52ff806b
commit 88ceb79af6
21 changed files with 868 additions and 370 deletions
+10 -3
View File
@@ -60,7 +60,7 @@
try {
const currentState = attempt === 1 ? state : await getState();
const password = currentState.password || currentState.customPassword || '';
const oauthUrl = await refreshOAuthUrlBeforeStep6(currentState);
const oauthUrl = await refreshOAuthUrlBeforeStep6(currentState, { visibleStep });
if (typeof startOAuthFlowTimeoutWindow === 'function') {
await startOAuthFlowTimeoutWindow({ step: visibleStep, oauthUrl });
}
@@ -105,9 +105,16 @@
}
if (isStep6SuccessResult(result)) {
await completeStepFromBackground(visibleStep, {
const completionPayload = {
loginVerificationRequestedAt: result.loginVerificationRequestedAt || null,
});
};
if (result.skipLoginVerificationStep) {
completionPayload.skipLoginVerificationStep = true;
}
if (result.directOAuthConsentPage) {
completionPayload.directOAuthConsentPage = true;
}
await completeStepFromBackground(visibleStep, completionPayload);
return;
}