capture_auth_session
Capture browser authentication sessions by opening a headed browser for manual OAuth/MFA login, then save the storage state for reuse in automated workflows.
Instructions
Open a headed browser for interactive OAuth/MFA login and save the session state.
A browser window opens — complete Google/GitHub OAuth or any MFA flow manually. The tool polls the URL every 500ms and saves storage state automatically once login succeeds.
Args: profile_name: Name to save the auth profile under login_url: URL of the login page to open success_url_pattern: URL substring that indicates successful login (e.g. "/dashboard") If omitted, any URL change away from login_url counts as success timeout_secs: Max seconds to wait for login (default: 120) user_data_dir: Optional path to a persistent Chromium profile dir (for OAuth providers that detect fresh browser contexts as bots, e.g. Google, LinkedIn)
Returns: dict with profile_name, requested_profile_name, status ("captured" | "timeout" | "error"), storage_state_path, note
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| login_url | Yes | ||
| profile_name | Yes | ||
| timeout_secs | No | ||
| user_data_dir | No | ||
| success_url_pattern | No |