login
Automate login with password, OAuth tokens, or HTTP Basic auth. Persists session state for reuse across automated tests.
Instructions
Orchestrate login and persist Playwright storageState. Strategies: password form, HTTP Basic, bearer/token inject, OAuth cookies/tokens, manual/OAuth window, reuse profileId. Auto (headless) when enough creds/tokens are provided; otherwise opens a headed window and waits.
DO NOT use this tool for Google OAuth / Sign in with Google, Microsoft/Apple/Discord social login, Cloudflare bot walls, or other restricted IdPs — those require set_session_auth. If you are about to open a headed login for Google OAuth, stop and follow the Restricted auth user-message template instead.
Example input:
{
"siteUrl": "https://app.example.com",
"authUrl": "https://app.example.com/login",
"username": "user@example.com",
"password": "secret"
}Example success: { "ok": true, "profileId": "prof_abc", "strategy": "password" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| oauth | No | OAuth tokens / cookies / storage to inject | |
| tokens | No | Generic bearer / cookie / storage tokens | |
| authUrl | Yes | Login / OAuth start URL | |
| siteUrl | Yes | Target application URL after login | |
| password | No | Password for password login | |
| username | No | Username or email for password login | |
| profileId | No | Reuse an existing auth profile id instead of logging in again | |
| timeoutMs | No | Max wait ms (default 120000) | |
| httpCredentials | No | HTTP Basic auth credentials |