Skip MFA on Repeat Logins

Complete MFA once and reuse authentication across future browser sessions

Skip MFA on Repeat Logins demo
TypeScript
Source code
npx create-browser-app --template manual-mfa-with-contexts
uvx create-browser-app --template manual-mfa-with-contexts

Persist authentication and skip MFA on repeat sessions

Eliminate MFA friction by completing authentication once and reusing it across future sessions. The first session saves authentication state including MFA trust and "remember device" status. Subsequent sessions automatically restore this state with no login or MFA prompts required. Perfect for payment automation, account management, and compliance workflows where you need reliable, repeated access to authenticated sites.

Steps

  1. Create a new Browserbase context to persist authentication state
  2. First session: Navigate to login page and fill in credentials
  3. Detect MFA prompt and pause for manual MFA completion
  4. Wait for user to complete MFA in the browser session
  5. Context automatically saves authentication state including MFA trust
  6. Second session: Reuse context with no login or MFA required
  7. Verify authentication by checking logged-in state