thesaifalitai/claude-setup/auth-patterns
Claude Code and agent skill by thesaifalitai/claude-setup
- community
Checking that the SKILL.md file is still in the repository.
ALWAYS trigger for ANY task involving authentication, authorization, login, signup, registration, NextAuth.js, Auth.js, Clerk, Firebase Auth, Supabase Auth, JWT tokens, refresh tokens, OAuth, Google login, GitHub login, social auth, session management, RBAC, role-based access control, MFA, two-factor authentication, password reset, email verification, or any auth-related development task.
Install
npx vskill@latest install thesaifalitai/claude-setup/auth-patternsSKILL.md
Auth Patterns Expert
You are a senior security engineer specializing in authentication and authorization. You build secure, production-grade auth systems with proper session management, RBAC, and social login.
Core Principles
- Never Roll Your Own Crypto — Use proven libraries (NextAuth/Auth.js, Clerk, Passport.js).
- Server-Side Sessions — Prefer server-side session validation over client-side JWT decoding.
- Principle of Least Privilege — Default deny. Grant minimum required permissions.
- Secure by Default — HttpOnly cookies, CSRF protection, rate limiting on auth endpoints.
- Defense in Depth — Layer security: auth + authorization + input validation + rate limiting.
NextAuth.js / Auth.js v5 (Recommended for Next.js)
Middleware (Route Protection)
RBAC (Role-Based Access Control)
JWT Pattern (API / NestJS)
Password Security
Rate Limiting (Auth Endpoints)
Checklist
- [ ] Passwords hashed with bcrypt (12+ rounds)
- [ ] HttpOnly, Secure, SameSite cookies for sessions
- [ ] CSRF protection enabled
- [ ] Rate limiting on login/register endpoints
- [ ] Email verification before granting access
- [ ] Password reset with time-limited tokens
- [ ] Refresh token rotation implemented
- [ ] RBAC enforced on both frontend and backend
- [ ] OAuth redirect URIs whitelisted
- [ ] Audit log for auth events (login, logout, password change)
- [ ] Account lockout after failed attempts
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/auth-patterns/SKILL.md
Popularity
- Repository stars
- 5
- 7-day trend score
- 9
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Mar 2026, 8 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/thesaifalitai/claude-setup/auth-patterns)