Skip to main content

Zitadel authentication for FastAPI

Project description

FastAPI Zitadel Auth

Simplify OAuth2 authentication and authorization in FastAPI apps using Zitadel.

Test status Code coverage Package version PyPI downloads Python versions mypy

Documentation: https://cleanenergyexchange.github.io/fastapi-zitadel-auth

Source Code: https://github.com/cleanenergyexchange/fastapi-zitadel-auth


Features

  • Authorization Code flow with PKCE
  • JWT validation using JWKS
  • Role-based access control using Zitadel roles
  • Service user authentication (JWT Profile)
  • Swagger UI integration
  • Type-safe token validation
  • Extensible claims and user models
  • Async loading of OpenID configuration

Note: This library implements JWT, locally validated using JWKS, as it prioritizes performance, see Zitadel docs on Opaque tokens vs JWT. If you need to validate opaque tokens using Introspection, please open an issue – PRs are welcome!

License

This project is licensed under the terms of the MIT license.

Acknowledgements

This package was heavily inspired by intility/fastapi-azure-auth. Give them a star ⭐️!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_zitadel_auth-0.2.5.tar.gz (175.1 kB view details)

Uploaded Source

Built Distribution

fastapi_zitadel_auth-0.2.5-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_zitadel_auth-0.2.5.tar.gz.

File metadata

  • Download URL: fastapi_zitadel_auth-0.2.5.tar.gz
  • Upload date:
  • Size: 175.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.3

File hashes

Hashes for fastapi_zitadel_auth-0.2.5.tar.gz
Algorithm Hash digest
SHA256 86f608484c7916393b051716988fa1a762e6816adfe9dc198390fe024a623f62
MD5 508344d708783f371e7edf9d74c82943
BLAKE2b-256 1a4c75a3002a8339b9fefaef48e14fe0810467b25eb466ff3f2d4d4db89625e9

See more details on using hashes here.

File details

Details for the file fastapi_zitadel_auth-0.2.5-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_zitadel_auth-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 c4e23397a083e62724bf350b3b82b959a1c48bdb169b0e5145d7aa415b2bb63b
MD5 ab0ee2e3dfe0e1adf5dc8c3f19511abd
BLAKE2b-256 f69f30b8cb3929c2ef909e213e87e67a60c438c96578c76fdc7048adcc139003

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page