MCPcopy Index your code
hub / github.com/QLHazyCoder/FlowPilot / submitVerificationCode

Function submitVerificationCode

background/verification-flow.js:347–366  ·  view source on GitHub ↗
(step, code)

Source from the content-addressed store, hash-verified

345 }
346
347 async function submitVerificationCode(step, code) {
348 const signupTabId = await getTabId('signup-page');
349 if (!signupTabId) {
350 throw new Error('认证页面标签页已关闭,无法填写验证码。');
351 }
352
353 await chrome.tabs.update(signupTabId, { active: true });
354 const result = await sendToContentScript('signup-page', {
355 type: 'FILL_CODE',
356 step,
357 source: 'background',
358 payload: { code },
359 });
360
361 if (result && result.error) {
362 throw new Error(result.error);
363 }
364
365 return result || {};
366 }
367
368 async function resolveVerificationStep(step, state, mail, options = {}) {
369 const stateKey = getVerificationCodeStateKey(step);

Callers 1

resolveVerificationStepFunction · 0.70

Calls 2

getTabIdFunction · 0.70
sendToContentScriptFunction · 0.70

Tested by

no test coverage detected