FastAuth
Ready-to-use customizable solution for FastAPI with Authentication, Authorization(RBAC) and OAuth2 support
About
Here’s a ready-to-use, customizable solution for FastAPI with Authentication, Authorization (RBAC), and OAuth2 support. This solution provides token based authentication(JWTHelper, Redis, DB), role-based access control, and OAuth2 integration. Highly inspired by FastAPI Users and AuthX:
- Documentation: https://astralmortem.github.io/fastauth/
- Source Code: https://github.com/AstralMortem/fastauth
Features
- Authentication Support:
- Access and Refresh Token Dependencies
- Different Token Strategy(JWTHelper, Redis, Session)
- Different Token locations(Header, Cookie, Query, etc.)
- Authorization Support:
- "Role and Permission required" Dependency
- OAuth2 support
- User Management:
- User Model protocol
- Service-Repository pattern for flexible customization
- Popular ORM support:
- SQLAlchemy2.0 support
- Beanie
- Tortoise ORM