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 License

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

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.2.tar.gz (174.5 kB view details)

Uploaded Source

Built Distribution

fastapi_zitadel_auth-0.2.2-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for fastapi_zitadel_auth-0.2.2.tar.gz
Algorithm Hash digest
SHA256 7c2aa36ca9ba560795cd53d4afdcfabba3029e58f52a1b8d1ba70e192ab7ae98
MD5 de000467ca00b79d5a7fa3164cd1f9dd
BLAKE2b-256 8662a90653a05ee007520b7df9a4db5070d7d2734c861ee05a2f89e275ec7b4f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_zitadel_auth-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2dccdf6c06569cf730ebacb8f8e142a51e5aa506499011c6926075e0e9727372
MD5 7eca3018110832bb4c31120a0a3ad903
BLAKE2b-256 0a393203af7e43edfd0569d8b5f01e4bfa086d49cfe581688d65e79eb01ece59

See more details on using hashes here.

Supported by

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