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

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_zitadel_auth-0.3.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_zitadel_auth-0.3.0.tar.gz
  • Upload date:
  • Size: 211.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fastapi_zitadel_auth-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3f6ff2e75db05bb2855a7035ff718553c29b8313fe77c695781eaaae93124956
MD5 6636d8ab62914bf82dcbf6e5e42f85b8
BLAKE2b-256 69e791535f14e2f56cbbb741fe7b25116f1adab06728cb77839282fe36b878f9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastapi_zitadel_auth-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.17 {"installer":{"name":"uv","version":"0.9.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fastapi_zitadel_auth-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b3b3444bf08c4f06a328c3026877c2056177bfff8fd9c0cfaad1fa5c07f086fb
MD5 9608bccd287f6bdbc8649d5166023697
BLAKE2b-256 cbfdcdbd4c8e8c4460bb21082e75ecd6a84b7623c977467e92ce9f7e538f5f16

See more details on using hashes here.

Supported by

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