login-flows
This skill provides battle-tested login automation patterns designed for Playwright end-to-end tests. Access curated code examples and authentication strategies that reduce hallucination and improve test reliability across sessions. Contribute and benefit from community-maintained patterns that evolve with real-world testing needs.
login-flows provides battle-tested code patterns for automating login flows in Playwright end-to-end tests. The skill focuses on reusable authentication strategies that reduce hallucination and improve test reliability across sessions. You'll find curated examples covering standard username/password flows, OAuth and SSO integrations, multi-factor authentication handling, and techniques for persisting browser state to avoid repeated login steps in your test suites.
AI-generated summary based on this skill's SKILL.md
Decision gist · record as of 2026-05-31
login-flows provides battle-tested code patterns for automating login flows in Playwright end-to-end tests. The skill focuses on reusable authentication strategies that reduce hallucination and improve test reliability across sessions. You'll find curated examples covering standard username/password flows, OAuth and SSO integrations, multi-factor authentication handling, and techniques for persisting browser state to avoid repeated login steps in your test suites.
Use it when
- login-flows offers community-maintained patterns that show you how to automate login in playwright tests through multiple approaches.
- Yes, login-flows is specifically designed to help you learn how to handle OAuth, SSO, and multi-factor authentication in test automation.
Verify before relying
Read SKILL.md below before installing (1 file). Open directory: indexed for reading, not audited.
Install
andrewyng/context-hub/login-flows · repository language: JavaScript
Open directory. Skills are indexed for reading, not audited. Review a skill's body before installing it.
Frequently asked questions
AI-generated answers based on this skill's SKILL.md and metadata
What are the main playwright login automation patterns this skill covers?
login-flows provides battle-tested code patterns for automating login flows in Playwright end-to-end tests. The skill focuses on reusable authentication strategies that reduce hallucination and improve test reliability across sessions. You'll find curated examples covering standard username/password flows, OAuth and SSO integrations, multi-factor authentication handling, and techniques for persisting browser state to avoid repeated login steps in your test suites.
How to automate login in playwright tests using this skill's patterns?
login-flows offers community-maintained patterns that show you how to automate login in playwright tests through multiple approaches. The skill includes examples for direct credential-based login, OAuth redirect handling, and SSO flows. You can also learn how to configure global setup and storageState in Playwright to persist authentication state between test runs, which speeds up your test suites by eliminating redundant login steps for each test.
Can login-flows help with OAuth, SSO, and multi-factor authentication in test automation?
Yes, login-flows is specifically designed to help you learn how to handle OAuth, SSO, and multi-factor authentication in test automation. The skill provides best practices for managing these complex authentication flows, including examples for automating Google sign-in, handling OAuth redirects, and implementing TOTP/2FA code generation within your Playwright tests. These patterns help you test login without repeating authentication across your entire test suite.
What's the best way to speed up test suites by persisting and reusing browser authentication state?
login-flows teaches you how to speed up test suites by persisting and reusing browser authentication state through Playwright's storageState feature and global setup configuration. Rather than logging in for every test, you can authenticate once in a setup phase, save the browser state, and reuse it across multiple tests. This approach dramatically reduces test execution time while maintaining security best practices for managing test credentials and avoiding repeated login steps.
How does login-flows help with managing test credentials and avoiding repeated login steps?
login-flows provides best practices for managing test credentials and avoiding repeated login steps in your Playwright test suites. The skill covers secure credential handling patterns, configuration of global setup workflows, and techniques for storing and retrieving authentication state. By implementing these reusable login patterns from login-flows, you can design end-to-end testing workflows that authenticate once and share that state across all tests, significantly improving both speed and maintainability.
What does login-flows teach about configuring global setup and storageState in Playwright?
login-flows explains how to understand and configure global setup and storageState in Playwright to create persistent login state for your test automation. The skill provides code examples showing how to set up a global authentication phase that runs once before your test suite, capture the resulting browser state, and inject that state into subsequent tests. This configuration pattern is central to reusable login patterns in e2e testing and eliminates the need to automate web app login testing repeatedly for every single test case.
SKILL.md
Rendered from the published skill. Quoted content, verbatim.
Login Flow Patterns for Playwright
Reusable patterns for automating login flows in end-to-end tests.
Basic Username/Password Login
import { Page } from '@playwright/test';
async function login(page: Page, username: string, password: string) {
await page.goto('/login');
await page.fill('[name="username"]', username);
await page.fill('[name="password"]', password);
await page.click('button[type="submit"]');
await page.waitForURL('/dashboard');
}
OAuth / SSO Login
For OAuth flows that redirect to an external provider:
```typescript async function loginWithOAuth(page: Page) { await page.goto('/login'); await page.click('text=Sign in with Google');
// Handle the OAuth popup or redirect await page.fill('input[type="email"]', process.env.TEST_EMAIL!); await page.click('text=Next'); await page.fill('input[type="password"]', process.env.TEST_PASSWORD!); await page.click('text=Next');
// Wait for redirect back to app
(truncated - see the full file via the links below)
File tree — 1 file
content/playwright-community/skills/login-flows/SKILL.md
Let your AI agent find skills like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 56,283 agent skills by what they can do, searchable in plain language.
wish › “Find reusable code patterns for automating login flows in Playwright end-to-end tests”
Give your agent the search over MCP, or paste the wish link into any chat. No install? Search from any chat →
Related skills
Automate web application testing by integrating Playwright into your workflow automation platform. This skill enables you to define, execute, and manage end-to-end browser tests across multiple environments, helping teams catch regressions and validate user interactions programmatically.
This skill teaches you how to build robust end-to-end tests using Playwright's browser automation framework. You'll learn to structure test suites, interact with web elements, handle asynchronous operations, and validate application behavior across multiple browsers. Perfect for developers looking to implement reliable testing strategies in their projects.
This skill equips you with Playwright, a powerful framework for automating browser-based testing across multiple platforms. Deploy comprehensive end-to-end test suites that validate your web application's functionality, user interactions, and cross-browser compatibility with minimal configuration overhead.
Playwright enables you to script and automate browser-based interactions across modern web applications. Use it to build end-to-end tests, validate user workflows, and verify application behavior in real browser environments without manual intervention.
Playwright enables you to script and automate browser-based workflows with precision. Use it to build reliable end-to-end tests, validate web applications, and handle complex user interactions across Chromium, Firefox, and WebKit engines.
playwright enables you to script browser automation tasks like testing web applications and extracting data from live sites. Control Chrome, Firefox, and WebKit instances through a unified API, handling complex user workflows and validating application behavior at scale.
More skills Chrome (unlicensed) · Playwright (MIT) · Playwright Skill (unlicensed)