Skip to content
Back to skills

Forge Auth And Sessions

ASecurity

Implement or review authentication, sessions, tokens and password handling without common security mistakes

  • 7 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 30, 2026
ai-agentsgosecurity

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add ansh44233/forge --skill forge-auth-and-sessions --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Forge Auth And Sessions?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Forge Auth And Sessions
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ansh44233-forge-auth-and-sessions/badge)](https://www.skillsdirectory.com/skills/ansh44233-forge-auth-and-sessions)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: forge-auth-and-sessions
description: Implement or review authentication, sessions, tokens and password handling without common security mistakes
---

<!-- Generated from catalog/skills/auth-and-sessions/SKILL.md by scripts/build-plugin.ts. Edit the catalog, not this file. -->

# Authentication and sessions

Use when touching login, signup, password reset, sessions, tokens or OAuth.

## Prefer proven building blocks
Use the framework's auth or a maintained library or provider. Do not invent token formats, crypto or password storage.

## Passwords
- Hash with argon2id, scrypt or bcrypt (with a reasonable work factor); never MD5/SHA-x alone, never reversible encryption.
- Rate-limit and add backoff to login and reset endpoints. Give the same response for unknown users and wrong passwords.
- Reset tokens: random, single-use, short-lived, stored hashed, and invalidated after a password change.

## Sessions and tokens
- Session cookies: `HttpOnly`, `Secure`, `SameSite=Lax` (or `Strict`), and rotate the session id on login and privilege change.
- JWTs: verify signature, `exp`, `iss` and `aud`; pin the algorithm (reject `none`). Keep them short-lived and use refresh tokens with rotation and revocation. Do not store long-lived tokens in `localStorage`.
- Logout must invalidate server-side sessions or refresh tokens.

## OAuth / OIDC
Authorization code flow with PKCE, validate `state` (and `nonce` for OIDC), exact redirect URI matching, and minimal scopes.

## Authorization
Check permissions on every request for the specific object (IDOR is the most common bug). Default deny.

## Verify
Tests for: wrong password, expired token, tampered token, reused reset token, another user's object id (expect 403/404), and rate limiting. Never log passwords or tokens.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.