auth-implementations
Implement authentication correctly — session/JWT/OAuth/SSC flows, password handling, MFA, and the failure modes that become breaches.
Skill by xanstomper
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/xanstomper-auth-implementations
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/auth-implementations
What's inside
- Skill name
auth-implementations- Description
- Implement authentication correctly — session/JWT/OAuth/SSC flows, password handling, MFA, and the failure modes that become breaches. Use when adding login/signup, fixing auth bugs, designing SSO, or reviewing an auth implementation.
- License
- MIT
- Instructions
- 38 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Files (1)
- SKILL.md
SKILL.md (first lines)
# Authentication Implementation Procedure Auth is where "it works" and "it's correct" diverge most. The failure modes are silent (tokens that never expire, sessions that survive email change) and the fixes are known — apply them mechanically. ## 1. Choose the credential model (by product shape) - Session cookies (httpOnly, Secure, SameSite=Lax): the default for anything browser-first — logout works, XSS can't read the token, size is tiny. - JWT: only when a stateless verifier is genuinely needed (API-to-API, multi-service without shared store). Short-lived access (5-15 min) + rotating refresh; store claims minimal (sub, exp, scope) — JWTs are signed, not secret. - OAuth/OIDC: for "sign in with X" and enterprise SSO — be the CLIENT first (Authorization Code + PKCE), run your own authorization SERVER only with a real reason (Authorization Code + PKCE always; implicit flow is deprecated, refuse it). ## 2. Passwords and credentials - argon2id (or bcrypt cost >=12) with per-user salt; constant-time compare; NO composition rules, max length generous (>=64), check against breached-password lists at signup and change. - Password reset: single-use token, <=30 min TTL, hashed at rest like a password, invalidates on use AND on password change; identical response for known/unknown email (no user enumeration anywhere in auth — login, signup, reset all return the same shape/timing). - Rate limits per account AND per IP on every credential endpoint; exponential lockout (not permanent lockout — permanent is a DoS on your users). ## 3. Session lifecycle (where silent breaches live) - Server-side session records with revocation (a row you can delete) even when tokens are JWTs (pair with a jti denylist or short TTL). - Session fixation: new session ID on EVERY privilege change (login, password change, MFA enable). Old sessions invalidated on password change — with a "log out everywhere" option users can trust. - Idle + absolute timeouts proportional to risk (banking ≠ forum); sliding renewal, not rolling invisibility. ## 4. MFA - TOTP (RFC 6238) as the base; WebAuthn/passkeys as the upgrade (phishing-resistant, now the default recommendation). SMS as last resort (SIM-swap). - Enforce MFA at login, not just enrollment; recovery codes generated at enrollment, single-use, hashed. MFA-bypass review: does the reset flow bypass MFA? (It must NOT — recovery-code challenge required.) - Step-up auth for sensitive actions (password change, API-key creation): re-challenge, don't trust the session age. ## 5. OAuth client pitfalls (the real-world breach list) - Validate `state` (CSRF) and `nonce` (replay) on every flow; check `iss` and audience on ID tokens; NEVER log tokens or codes; redirect URIs exact-matched (no prefix matching — open-redirect via redirect_uri is a classic). - Token storage: browser = httpOnly cookie or memory only; localStorage = XSS-exfiltrated tokens. Native apps: system browser + PKCE, never webviews. ## 6. Verify (attack your own auth) - Test matrix: expired token, revoked session, token from another user, replayed code, reset-token reuse, login-with-old-password, MFA-skip-via-reset, JWT alg=none/kid-confusion, missing state, prefix redirect match. Each is a one-line curl — the suite runs in CI forever. - Audit-log every auth event (login success/fail, reset, MFA change, session revoke) with IP+UA — the breach investigation you haven't had yet starts here. ## Pitfalls - JWT in localStorage "for simplicity": one XSS and every user's identity is stolen silently. Cookies with SameSite have their own CSRF story — pick one threat model and handle it completely. - Email-as-identity assumptions: emails change (and get recycled). Use immutable user IDs internally; emails are login labels with a verified flag. - Building SSO without reading the spec: OIDC has three flows and only one is correct for your shape — implement from the spec + a maintained library, never from a blog post.
From xanstomper/mochi, MIT.
More from xanstomper/mochi
- 0.587score
accessibility-audit
xanstomper
Audit and fix accessibility (a11y) — WCAG 2.2 AA compliance, screen-reader flows, keyboard navigation, and ARIA correctness for web apps.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-backwards-compatibility
xanstomper
Change APIs without breaking existing clients — deprecation windows, additive changes, and safe removal.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-design
xanstomper
Design public APIs and CLIs — naming, ergonomics, versioning, error surfaces, and backward-compat discipline.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-integration
xanstomper
Integrate third-party APIs correctly — auth patterns, retry/backoff, pagination, rate limits, idempotency, and contract testing.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-security-hardening
xanstomper
Secure web APIs and backends — authz enforcement, injection prevention, rate limiting, secret handling, and the OWASP-class checks that block real attacks.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-versioning
xanstomper
Evolve APIs without breaking clients — additive change first, deprecation windows, compatibility shims, and migration paths.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
async-concurrency
xanstomper
Design correct async and concurrent code — bounded parallelism, backpressure, cancellation, and deadlock avoidance.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
benchmark-methodology
xanstomper
Honest benchmarking with TTFF/TTFI/PSS probes — cold start, token throughput, prompt-to-first-token.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
browser-automation
xanstomper
Automate real browsers for testing and scraping — Playwright-first flows, selector strategy, waiting discipline, and anti-flake patterns.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
caching-strategy
xanstomper
Design caching layers — HTTP caching, CDN, application memory caches, invalidation patterns, and cache-coherence reasoning.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
chaos-engineering
xanstomper
Prove a system survives failure by injecting it deliberately — game days, fault injection, and steady-state hypotheses.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
checkpoint-semantics
xanstomper
Git-backed checkpoints and rollback composition — naming, nesting, conflicts, when to auto-commit.
SkillAFreshness: A★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 2
- Open issues
- 6
- Last commit (this folder)
- Oct 12, 2026 (17 days ago)
- Last release
- Oct 23, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/xanstomper/mochi
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from xanstomper
- 0.587score
api-backwards-compatibility
xanstomper
Change APIs without breaking existing clients — deprecation windows, additive changes, and safe removal.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-design
xanstomper
Design public APIs and CLIs — naming, ergonomics, versioning, error surfaces, and backward-compat discipline.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-integration
xanstomper
Integrate third-party APIs correctly — auth patterns, retry/backoff, pagination, rate limits, idempotency, and contract testing.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-security-hardening
xanstomper
Secure web APIs and backends — authz enforcement, injection prevention, rate limiting, secret handling, and the OWASP-class checks that block real attacks.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
api-versioning
xanstomper
Evolve APIs without breaking clients — additive change first, deprecation windows, compatibility shims, and migration paths.
SkillAFreshness: A★ 1Claude Code +9 - 0.587score
accessibility-audit
xanstomper
Audit and fix accessibility (a11y) — WCAG 2.2 AA compliance, screen-reader flows, keyboard navigation, and ARIA correctness for web apps.
SkillAFreshness: A★ 1Claude Code +9
Cite this page
auth-implementations skill. Agent Mart. https://agentmart.dev/skills/xanstomper-auth-implementations (last updated 2026-10-24)