fix: recover add-phone flow from auth error pages
This commit is contained in:
@@ -10802,6 +10802,28 @@ const phoneVerificationHelpers = self.MultiPageBackgroundPhoneVerification?.crea
|
||||
DEFAULT_PHONE_CODE_POLL_INTERVAL_SECONDS,
|
||||
DEFAULT_PHONE_CODE_POLL_ROUNDS,
|
||||
ensureStep8SignupPageReady,
|
||||
navigateAuthTabToAddPhone: async (tabId, options = {}) => {
|
||||
const visibleStep = Math.floor(Number(options.visibleStep || options.step) || 0) || 9;
|
||||
const requestedTimeoutMs = Number(options.timeoutMs);
|
||||
const timeoutMs = Number.isFinite(requestedTimeoutMs) && requestedTimeoutMs > 0
|
||||
? requestedTimeoutMs
|
||||
: await getOAuthFlowStepTimeoutMs(30000, {
|
||||
step: visibleStep,
|
||||
actionLabel: 'direct add-phone navigation',
|
||||
});
|
||||
await chrome.tabs.update(tabId, { url: 'https://auth.openai.com/add-phone', active: true });
|
||||
await ensureStep8SignupPageReady(tabId, {
|
||||
timeoutMs,
|
||||
visibleStep,
|
||||
logStepKey: options.logStepKey || 'phone-verification',
|
||||
logMessage: options.logMessage || '步骤 9:认证页已失联,直接打开添加手机号页面后等待脚本恢复。',
|
||||
});
|
||||
return {
|
||||
addPhonePage: true,
|
||||
phoneVerificationPage: false,
|
||||
url: 'https://auth.openai.com/add-phone',
|
||||
};
|
||||
},
|
||||
generateRandomBirthday,
|
||||
generateRandomName,
|
||||
getOAuthFlowRemainingMs,
|
||||
|
||||
Reference in New Issue
Block a user