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.3.tar.gz (213.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.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_zitadel_auth-0.3.3.tar.gz
  • Upload date:
  • Size: 213.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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.3.tar.gz
Algorithm Hash digest
SHA256 d7f9758faad7ca2adf191acccc85157cac3798cf0f45dba1cac3b31ea87544e1
MD5 bd17a2f9a9df2edeb49ff49c3b3ba47c
BLAKE2b-256 0d9a95fb444b4f47a4734197d586eb1e81d4b2c4d53319d53e3684c80ebd2cac

See more details on using hashes here.

File details

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

File metadata

  • Download URL: fastapi_zitadel_auth-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 18f27e7dd5a01956da527573e2ca4d55e412f208064c2bbf54c40c6953267939
MD5 f1e0b60f4d8857c18c31e7ca7cb73e13
BLAKE2b-256 f5761df6b334d15971e4254c9e1e59983acecbcbd8c10cf0494ca0562ffa22d6

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