forge-auth

Audit authentication code for password, session, JWT, OAuth, and MFA vulnerabilities.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/f4rkh4d/forge-skill --skill forge-auth
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: forge-auth
Source: https://github.com/f4rkh4d/forge-skill/tree/main/skills/backend/forge-auth
Command: npx skills add https://github.com/f4rkh4d/forge-skill --skill forge-auth

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents high-impact authentication mistakes by replacing fragile, ad-hoc patterns with well-understood, production-grade security primitives.

Core Features & Use Cases

  • Hard rules for password hashing, sessions, JWT, OAuth, MFA, and resets: Argon2id/bcrypt, CSPRNG session IDs, secure cookies, RS256/EdDSA JWT verification, OAuth 2.1 with PKCE + state, MFA via TOTP/WebAuthn, and single-use hashed reset tokens.
  • Anti-enumeration and timing discipline: Prevents user/account discovery and response-timing leaks on login and signup flows.
  • Operational verification guidance: Includes an executable verifier that flags common weak patterns (e.g., Math.random for tokens, JWT decode without verify, localStorage token storage).

Quick Start

Use the forge-auth verifier to scan your authentication code at forge-auth/verify/check_auth.sh with a path to your auth implementation file.

Frequently Asked Questions about forge-auth

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

FAQPage Schema
How do I secure JWT verification to prevent algorithm bypass attacks?▼

Secure JWT verification requires strict algorithm enforcement using RS256 or EdDSA, explicitly rejecting unsigned tokens. This Skill hardens JWT implementations by preventing decode-without-verify vulnerabilities and eliminating weak token storage patterns like localStorage.

What is the best way to implement OAuth 2.1 PKCE and state validation?▼

The best way to implement OAuth PKCE involves requiring mandatory state parameters alongside code challenges. This Skill enforces OAuth 2.1 standards by mandating PKCE and state validation, replacing ad-hoc authorization flows with production-grade security primitives.

How do I prevent user enumeration and timing attacks on login endpoints?▼

Preventing user enumeration requires anti-enumeration controls and strict response timing discipline on login and signup flows. This Skill secures authentication endpoints by implementing enumeration-safe responses and preventing account discovery through timing leaks.

Does my password reset flow need single-use hashed tokens?▼

Password reset flows require hashed single-use reset tokens to prevent replay attacks and token interception. This Skill hardens account recovery endpoints by enforcing hashed reset tokens with enumeration-safe responses, replacing fragile reset patterns.

How to configure secure session cookies with HttpOnly and SameSite attributes?▼

Configuring secure session cookies requires setting HttpOnly, Secure, and SameSite attributes alongside CSPRNG-generated session identifiers. This Skill enforces secure cookie configurations and cryptographically secure session IDs to resist session fixation breaches.

When should I use argon2id instead of bcrypt for password hashing?▼

Argon2id is recommended for password hashing when resisting GPU-based attacks is critical, while bcrypt remains a viable fallback. This Skill enforces argon2id and bcrypt hashing rules, replacing weak password storage patterns with production-grade primitives.