Handle combined signup verification/profile page

This commit is contained in:
EmptyDust
2026-05-02 11:19:22 +08:00
parent 99313843c1
commit 2bfa277aa1
8 changed files with 479 additions and 7 deletions
+5 -1
View File
@@ -328,7 +328,11 @@
const step5Status = latestState.stepStatuses?.[5];
if (step5Status !== 'running' && step5Status !== 'completed' && step5Status !== 'manual_completed') {
await setStepStatus(5, 'skipped');
await addLog('步骤 4:检测到账号已直接进入已登录态,已自动跳过步骤 5。', 'warn');
if (payload.skipProfileStepReason === 'combined_verification_profile') {
await addLog('步骤 4:当前验证码页已内嵌完成注册资料提交,已自动跳过步骤 5。', 'warn');
} else {
await addLog('步骤 4:检测到账号已直接进入已登录态,已自动跳过步骤 5。', 'warn');
}
}
}
break;
+19
View File
@@ -9,6 +9,8 @@
chrome,
completeStepFromBackground,
confirmCustomVerificationStepBypass,
generateRandomBirthday,
generateRandomName,
ensureMail2925MailboxSession,
ensureIcloudMailSession,
getMailConfig,
@@ -25,6 +27,21 @@
throwIfStopped,
} = deps;
function buildSignupProfileForVerificationStep() {
const name = typeof generateRandomName === 'function' ? generateRandomName() : null;
const birthday = typeof generateRandomBirthday === 'function' ? generateRandomBirthday() : null;
if (!name?.firstName || !name?.lastName || !birthday) {
return null;
}
return {
firstName: name.firstName,
lastName: name.lastName,
year: birthday.year,
month: birthday.month,
day: birthday.day,
};
}
function getExpectedMail2925MailboxEmail(state = {}) {
if (Boolean(state?.mail2925UseAccountPool)) {
const currentAccountId = String(state?.currentMail2925AccountId || '').trim();
@@ -152,12 +169,14 @@
LUCKMAIL_PROVIDER,
CLOUDFLARE_TEMP_EMAIL_PROVIDER,
].includes(mail.provider);
const signupProfile = buildSignupProfileForVerificationStep();
await resolveVerificationStep(4, state, mail, {
filterAfterTimestamp: verificationFilterAfterTimestamp,
sessionKey: verificationSessionKey,
disableTimeBudgetCap: mail.provider === '2925',
requestFreshCodeFirst: shouldRequestFreshCodeFirst,
signupProfile,
resendIntervalMs: mail.provider === LUCKMAIL_PROVIDER
? 15000
: ((mail.provider === HOTMAIL_PROVIDER || mail.provider === '2925')
+4 -1
View File
@@ -909,7 +909,10 @@
type: 'FILL_CODE',
step,
source: 'background',
payload: { code },
payload: {
code,
...(step === 4 && options.signupProfile ? { signupProfile: options.signupProfile } : {}),
},
};
let result;
if (typeof sendToContentScriptResilient === 'function') {