A ready-to-use and customizable authentication and OAuth2 management library for FastAPI applications.
AuthX is a Python library that provides ready-to-use and customizable authentication and OAuth2 management for FastAPI applications. It solves the problem of implementing secure, production-grade authentication systems by offering features like JWT tokens, refresh tokens, and token revocation out of the box.
FastAPI developers who need to add authentication and authorization to their web applications or APIs without building a custom solution from scratch.
Developers choose AuthX because it integrates seamlessly with FastAPI, is highly customizable, and includes advanced security features like token freshness and blocklisting, reducing development time and potential security risks.
Ready-to-use and customizable Authentications and Oauth2 management for FastAPI ✨
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Designed specifically for FastAPI, it allows easy dependency injection and error handling integration, as shown in the quick start with Depends and handle_errors.
Supports multiple token locations including headers, cookies, query parameters, and JSON body, plus access and refresh tokens for robust session handling.
Implements token freshness for sensitive operations and token revocation via a blocklist, adding security layers beyond standard JWT.
Provides customizable error responses for authentication failures, making it adaptable to different API requirements.
Advanced functionalities like Redis session store and HTTP caching require installing the separate 'authx-extra' package, complicating dependency management.
Primarily focuses on JWT authentication, which may not suit projects needing alternative methods like session-based auth without additional customization.
Requires manual setup of configurations such as JWT_SECRET_KEY and token locations, which could be error-prone in rapid prototyping or for beginners.