Безопасная аутентификация: JWT, OAuth и сессии
★ 6.6 · security
authentication-patterns is a Claude Code skill that guides secure, production-ready authentication implementation by comparing session-based, JWT, and OAuth 2.0/OIDC approaches and providing a structured decision guide for each scenario. It covers JWT best practices in detail — refresh token rotation, httpOnly cookie storage, short access token expiry, and asymmetric signing for distributed systems — alongside a provider comparison table for NextAuth/Auth.js, Clerk, Supabase Auth, and Lucia. A ready-to-use NextAuth.js setup pattern with Prisma adapter is included. The pre-shipping security checklist addresses rate limiting, CSRF protection, bcrypt/argon2id password hashing, account enumeration prevention, session invalidation on logout, and MFA support. Use this skill when building auth from scratch, reviewing existing flows, or migrating between authentication strategies.
- #authentication
- #jwt
- #oauth
- #session-management
- #nextauth
- #clerk
- #supabase