auth-patterns

Enforce bcrypt or Argon2 password hashing with constant-time verification.

13|2|Updated Jan 21, 2026
One-click install
npx skills add https://github.com/yanko-belov/code-craft --skill auth-patterns-yanko-belov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: auth-patterns
Source: https://github.com/yanko-belov/code-craft/tree/main/skills/auth-patterns
Command: npx skills add https://github.com/yanko-belov/code-craft --skill auth-patterns-yanko-belov

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Never store plain passwords. Use proven authentication patterns to protect user data and reduce risk from weak or misconfigured auth flows.

Core Features & Use Cases

  • Enforce secure password storage with bcrypt or Argon2, including salting and slow hashing.
  • Provide safe registration and login guidance with constant-time verification and generic error messages.
  • Cover session and token handling best practices for web APIs and mobile apps.

Quick Start

Use this skill to implement secure user authentication in your API, ensuring passwords are never stored in plaintext and are hashed with a strong, slow algorithm.

Frequently Asked Questions about auth-patterns

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

FAQPage Schema
How do I securely store user passwords in my web API backend?

Secure password storage requires hashing plain text passwords using slow algorithms like bcrypt or Argon2 with proper salting. You must apply these patterns during user registration to ensure credentials are never stored in plaintext.

What is the best way to prevent user enumeration during login and registration?

Preventing user enumeration requires generic error handling during login and registration. Return identical error messages for invalid credentials whether the username exists or not, and use constant-time password verification to avoid timing attacks.

Should I use bcrypt or Argon2 for password hashing in my application?

Both bcrypt and Argon2 are proven slow hashing algorithms for secure authentication. You should use either to enforce secure password storage with salting, ensuring that hashes are computationally expensive to crack.

How do I implement secure session management for mobile app backends?

Secure session management for mobile backends involves applying safe token handling best practices across web APIs and mobile apps. You must enforce secure authentication flows from development through production to protect active user sessions.

Why does constant-time password verification matter for secure login flows?

Constant-time verification matters because it prevents timing attacks during the login process. By ensuring password checks take the same amount of time regardless of match success, you protect user credentials and prevent user enumeration.