← ClaudeAtlas

auth-session-and-oauthlisted

Use when a ticket touches how a user proves who they are — login, logout, sessions, cookies, JWTs, refresh tokens, password reset, OAuth/OIDC sign-in with a provider, API keys — and the implementation must use the repo's existing auth library and the platform's primitives correctly, never home-grown crypto. Invoke for "add login with Google", "sessions expire too fast", "implement password reset", "rotate the API key", or any authentication change.
tmj-90/gaffer · ★ 1 · API & Backend · score 70
Install: claude install-skill tmj-90/gaffer
# Implement authentication correctly A small mistake in authentication is a full account takeover. Use the repo's mature library, follow the protocol as specified, and make every credential expire, rotate and revoke (ASVS 5.0 V6/V7/V9/V10; NIST SP 800-63B-4; RFC 9700; OWASP cheat sheets). What a logged-in user may do is the `security-authz` skill. ## Procedure 1. **Use the repo's auth stack.** Find the library and session store in use (Auth.js, Passport, Spring Security, Devise, ASP.NET Identity, an OIDC client) and call `search_lore`. Never write your own hashing, token format or OAuth flow. If the repo has no library and the ticket needs one, raise `request_decision` with a recommendation and `mark_ticket_blocked` naming the dependency. Never install it yourself: the safety hook blocks installs. 2. **Passwords** (only if the ticket touches them): - Hash with Argon2id (at least m=19 MiB, t=2, p=1). Otherwise use scrypt (N=2^17, r=8, p=1), or bcrypt with cost ≥10, which **ignores input past 72 bytes**: reject longer input rather than silently truncating. Use PBKDF2-HMAC-SHA256 at 600,000 iterations or more only where FIPS requires it. - Rehash on login when the parameters are outdated. - Policy: minimum 15 characters with password as the only factor (8 if MFA is enforced), allow at least 64, no composition rules, no periodic expiry, accept paste and Unicode, and check against a breached or common-password list. Verify t