login-flows

Automate web application login flows with Playwright TypeScript patterns.

13.9k|1.2k|Updated Oct 30, 2025
One-click install
npx skills add https://github.com/andrewyng/context-hub --skill login-flows
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: login-flows
Source: https://github.com/andrewyng/context-hub/tree/main/content/playwright-community/skills/login-flows
Command: npx skills add https://github.com/andrewyng/context-hub --skill login-flows

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill addresses the common challenge of automating user login processes across various web applications, providing robust patterns for different authentication methods.

Core Features & Use Cases

  • Basic Username/Password Login: Automates standard form-based logins.
  • OAuth/SSO Integration: Handles redirects and authentication through third-party providers like Google.
  • State Persistence: Demonstrates how to use storageState to maintain login sessions across tests, significantly speeding up execution.
  • MFA/2FA Handling: Includes a pattern for managing multi-factor authentication using TOTP codes.

Quick Start

Use the login-flows skill to automate a basic username and password login for a web application.

Frequently Asked Questions about login-flows

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate web app login with Playwright using basic credentials?

Automate web app login with Playwright using reusable TypeScript patterns that target standard form-based username and password fields. This provides a foundational script to input credentials and submit the authentication form for end-to-end testing.

Can I handle OAuth or SSO redirects in Playwright automation?

Yes, you can handle OAuth or SSO redirects in Playwright automation using provided TypeScript patterns. These scripts manage the redirect flow and authentication process through third-party providers like Google for your web application tests.

What is the best way to speed up Playwright tests by skipping login?

The best way to speed up Playwright tests is using state persistence with `storageState` to maintain login sessions. This technique saves the authenticated browser state and reuses it across multiple tests, significantly speeding up execution by skipping repeated logins.

How does Playwright handle multi-factor authentication or 2FA in testing?

Playwright handles multi-factor authentication or 2FA in testing using a specific pattern for managing TOTP codes. This allows your automation scripts to generate and input the required time-based one-time passwords to successfully complete the login flow.

Does this login automation approach work with TypeScript?

Yes, this login automation approach works with TypeScript, providing reusable code patterns specifically designed for the Playwright framework. It covers various authentication scenarios including basic credentials, OAuth, and MFA for robust end-to-end testing.