Metadata-Version: 2.4
Name: litestar-auth
Version: 1.8.0
Summary: Litestar Auth
Project-URL: homepage, https://github.com/ZYLVEXT/litestar-auth
Project-URL: documentation, https://zylvext.github.io/litestar-auth/
Project-URL: source, https://github.com/ZYLVEXT/litestar-auth
Project-URL: tracker, https://github.com/ZYLVEXT/litestar-auth/issues
Author-email: Vladislav Shepilov <shepilov.v@protonmail.com>
Maintainer-email: Vladislav Shepilov <shepilov.v@protonmail.com>
License: MIT
License-File: LICENSE
Keywords: auth,authentication,authorization,database,httpx-oauth,jwt,library,litestar,oauth,redis
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Requires-Python: <3.15.0,>=3.12.0
Requires-Dist: advanced-alchemy<2.0,>=1.9.3
Requires-Dist: litestar<3.0,>=2.21.1
Requires-Dist: pwdlib[argon2,bcrypt]<0.4.0,>=0.3.0
Requires-Dist: pyjwt<3.0,>=2.12.1
Provides-Extra: all
Requires-Dist: cryptography>=46.0.7; extra == 'all'
Requires-Dist: httpx-oauth<0.17.0,>=0.16.1; extra == 'all'
Requires-Dist: redis<8.0.0,>=7.4.0; extra == 'all'
Provides-Extra: oauth
Requires-Dist: cryptography>=46.0.7; extra == 'oauth'
Requires-Dist: httpx-oauth<0.17.0,>=0.16.1; extra == 'oauth'
Provides-Extra: redis
Requires-Dist: redis<8.0.0,>=7.4.0; extra == 'redis'
Provides-Extra: totp
Requires-Dist: cryptography>=46.0.7; extra == 'totp'
Description-Content-Type: text/markdown

# litestar-auth

Authentication and authorization for [Litestar](https://litestar.dev/) applications: registration, login, email verification, password reset, OAuth2, TOTP (2FA), route guards, and optional rate limiting—wired as a Litestar **plugin** with **transport + strategy** backends.

---

<p align="center">

  <a href="https://github.com/ZYLVEXT/litestar-auth/actions/workflows/1_test.yml" target="_blank">
    <img src="https://github.com/ZYLVEXT/litestar-auth/actions/workflows/1_test.yml/badge.svg?branch=main" alt="Test Passing"/>
  </a>

  <a href="https://codecov.io/gh/ZYLVEXT/litestar-auth" target="_blank">
    <img src="https://codecov.io/gh/ZYLVEXT/litestar-auth/branch/main/graph/badge.svg" alt="Coverage"/>
  </a>

  <a href="https://www.pepy.tech/projects/litestar-auth" target="_blank">
    <img src="https://static.pepy.tech/personalized-badge/litestar-auth?period=month&units=international_system&left_color=grey&right_color=green&left_text=downloads/month" alt="Downloads"/>
  </a>

  <a href="https://pypi.org/project/litestar-auth" target="_blank">
    <img src="https://img.shields.io/pypi/v/litestar-auth.svg?label=PyPI" alt="Package version"/>
  </a>

  <a href="https://pypi.org/project/litestar-auth" target="_blank">
    <img src="https://img.shields.io/pypi/pyversions/litestar-auth.svg" alt="Supported Python versions"/>
  </a>

  <a href="https://github.com/ZYLVEXT/litestar-auth/blob/main/LICENSE" target="_blank">
    <img src="https://img.shields.io/github/license/ZYLVEXT/litestar-auth.svg" alt="License"/>
  </a>

  <a href="https://zylvext.github.io/litestar-auth/" target="_blank">
    <img src="https://img.shields.io/badge/docs-online-green.svg" alt="Documentation"/>
  </a>

</p>

---

**Documentation:** [https://zylvext.github.io/litestar-auth/](https://zylvext.github.io/litestar-auth/)

## Install

```bash
uv add litestar-auth
# or: pip install litestar-auth
```

Optional extras: `redis`, `oauth`, `totp`, or `all` — see the [installation guide](docs/install.md).

## Quickstart

Follow [docs/quickstart.md](docs/quickstart.md) for a minimal Bearer + JWT setup with the default SQLAlchemy user model.

## Role management CLI

When your app uses `LitestarAuth`, provides `session_maker`, and exposes a relational role-capable
SQLAlchemy `user_model`, the plugin also registers `litestar roles` for role-catalog and user-role
administration. This operator surface is CLI-only: the HTTP API still exposes only the flat
normalized `user.roles` contract and does not add role-management endpoints.

See [docs/guides/roles_cli.md](docs/guides/roles_cli.md) for prerequisites, command examples, and
custom-model compatibility notes.

## Repository

Contributing, local docs build, and verification commands are described in [docs/contributing.md](docs/contributing.md).
