JWT-аутентификация для FastAPI
★ 7.5 · general
jwt-authentication is a Claude Code skill that provides ready-to-use JWT authentication patterns for FastAPI. It implements a dual-token strategy: a short-lived access token (15 min, stateless JWT, kept in memory) and a long-lived refresh token (7 days, stored as a hash in the database and delivered via httpOnly cookie). The skill covers login with rate limiting (5 attempts per IP per 15 minutes), registration, refresh token rotation with immediate invalidation of the previous token, token revocation, and a get_current_user dependency for protecting routes. Built with python-jose and passlib (bcrypt), it deliberately returns identical error messages for wrong email and wrong password to prevent user enumeration. Ideal for developers setting up a secure authentication system from scratch on FastAPI.