Skip to content

FastAuth

FastAuth

Ready-to-use customizable solution for FastAPI with Authentication, Authorization(RBAC) and OAuth2 support


About

CI GitHub Actions Workflow Status codecov PyPI - Version PyPI - Downloads

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:


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