MCPcopy
hub / github.com/QLHazyCoder/FlowPilot / step6SwitchToOneTimeCodeLogin

Function step6SwitchToOneTimeCodeLogin

content/signup-page.js:1582–1597  ·  view source on GitHub ↗
(snapshot)

Source from the content-addressed store, hash-verified

1580}
1581
1582async function step6SwitchToOneTimeCodeLogin(snapshot) {
1583 const switchTrigger = snapshot?.switchTrigger || findOneTimeCodeLoginTrigger();
1584 if (!switchTrigger || !isActionEnabled(switchTrigger)) {
1585 return createStep6RecoverableResult('missing_one_time_code_trigger', normalizeStep6Snapshot(inspectLoginAuthState()), {
1586 message: '当前登录页没有可用的一次性验证码登录入口。',
1587 });
1588 }
1589
1590 log('步骤 6:已检测到一次性验证码登录入口,准备切换...');
1591 const loginVerificationRequestedAt = Date.now();
1592 await humanPause(350, 900);
1593 simulateClick(switchTrigger);
1594 log('步骤 6:已点击一次性验证码登录');
1595 await sleep(1200);
1596 return waitForStep6SwitchTransition(loginVerificationRequestedAt);
1597}
1598
1599async function step6LoginFromPasswordPage(payload, snapshot) {
1600 const currentSnapshot = normalizeStep6Snapshot(snapshot || inspectLoginAuthState());

Callers 1

Calls 10

isActionEnabledFunction · 0.85
normalizeStep6SnapshotFunction · 0.85
inspectLoginAuthStateFunction · 0.85
logFunction · 0.85
humanPauseFunction · 0.85
simulateClickFunction · 0.85
sleepFunction · 0.85

Tested by

no test coverage detected