An open API service indexing awesome lists of open source software.

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

OAuth2 in FastAPI apps using Zitadel
https://github.com/cleanenergyexchange/fastapi-zitadel-auth

asyncio fastapi jwks jwt oauth2 oidc zitadel

Last synced: 16 days ago
JSON representation

OAuth2 in FastAPI apps using Zitadel

Awesome Lists containing this project

README

          

# 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](https://zitadel.com/docs/concepts/knowledge/opaque-tokens#use-cases-and-trade-offs).
If you need to validate opaque tokens using Introspection,
please [open an issue](https://github.com/cleanenergyexchange/fastapi-zitadel-auth/issues?q=is%3Aissue%20state%3Aopen%20introspection) – PRs are welcome!

## License

This project is licensed under the terms of the [MIT license](https://github.com/cleanenergyexchange/fastapi-zitadel-auth/blob/main/LICENCE).

## Acknowledgements

This package was heavily inspired by [intility/fastapi-azure-auth](https://github.com/intility/fastapi-azure-auth/).
Give them a star ⭐️!