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
- Host: GitHub
- URL: https://github.com/cleanenergyexchange/fastapi-zitadel-auth
- Owner: cleanenergyexchange
- License: mit
- Created: 2024-11-12T09:18:44.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-18T12:33:08.000Z (about 2 months ago)
- Last Synced: 2025-08-19T04:11:35.638Z (about 2 months ago)
- Topics: asyncio, fastapi, jwks, jwt, oauth2, oidc, zitadel
- Language: Python
- Homepage: https://cleanenergyexchange.github.io/fastapi-zitadel-auth/
- Size: 858 KB
- Stars: 27
- Watchers: 5
- Forks: 4
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI Zitadel Auth
Simplify OAuth2 authentication and authorization in FastAPI apps using Zitadel.---
**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 ⭐️!