Litestar Security#
Authentication and authorization for Litestar applications.
Litestar Security connects local accounts, external identity providers, API keys, and workload tokens to Litestar’s middleware, dependency injection, guards, OpenAPI schema, and WebSocket lifecycle.
Get started
Install the plugin and choose an authentication method.
Choose a provider
Use local accounts, OAuth, OIDC, IAP, API keys, or workload JWTs.
Protect routes
Declare public routes and enforce scopes, roles, teams, and tenants.
Run an example
Try each supported authentication method with local dependencies.
API reference
Browse the public packages and types.