Use a session for SSO, MFA, or magic-link login
Sign in yourself, then supply the resulting browser session.
2 min read · LatchKey support
What to know
A browser session can contain cookies and local storage that grant access to your account. Treat the exported file like a password. Keep it out of source control, screenshots, and support messages.
What to do
- Use Playwright locally to open your login page and save storage state with the command below. Replace the example URL with your login page.
- Complete sign-in yourself, including any MFA step, and reach the protected page. Close the browser window to finish saving.
- In Project settings, choose the pasted-session login method. Open New scan and paste the JSON file contents into Session state JSON.
- Start the scan while the session is fresh. Remove the local file when no longer needed and revoke the test session if appropriate.
npx playwright open --save-storage=session.json https://app.example.com/loginWhat happens next
LatchKey reuses the supplied state for the scan; it does not handle your one-time codes. An expired state needs a fresh export, not repeated retries of the same file.
If you need more help
Some applications keep login state in mechanisms that are not captured by this flow, such as session storage. If a fresh export still opens the login page, ask your developer or support to review the authentication setup.
Was anything unclear or missing?
Suggest an improvement or ask the team →