Metadata-Version: 2.4
Name: noauth
Version: 0.1.2
Summary: Centralized OAuth token service on Modal with encrypted storage and automatic refresh.
Author-email: Tomas Roda <dev@tomasroda.com>
License-Expression: MIT
Project-URL: Repository, https://github.com/thehumanworks/noauth
Keywords: oauth,tokens,modal,fastapi,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.12
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx>=0.28.0
Requires-Dist: pydantic>=2.12.5
Provides-Extra: server
Requires-Dist: cryptography>=46.0.3; extra == "server"
Requires-Dist: fastapi>=0.128.0; extra == "server"
Requires-Dist: modal>=1.3.0.post1; extra == "server"
Provides-Extra: cli
Requires-Dist: typer>=0.15.0; extra == "cli"
Requires-Dist: rich>=13.0.0; extra == "cli"
Dynamic: license-file

# noauth

Centralized OAuth token service on Modal with encrypted storage and automatic refresh.

## SDK install (GitHub)

Use this when you only want the client library (no Modal server deps). This install does not pull Modal.

```bash
uv pip install "git+https://github.com/thehumanworks/noauth.git"
```

Minimal usage:

```python
from noauth.sdk import NoAuthClient

# Credentials can be provided via:
# 1. Explicit parameters (shown below)
# 2. Environment variables (NOAUTH_CLIENT_ID, NOAUTH_CLIENT_SECRET)
# 3. ~/.modal.toml file

client = NoAuthClient(
    base_url="https://<your-app>.modal.run",
    token_id="wk-...",
    token_secret="ws-...",
)
print(client.health().message)
```

## Server install (Modal app)

Use this when you want to deploy the service:

```bash
uv pip install "git+https://github.com/thehumanworks/noauth.git#egg=noauth[server]"
```

Deploy:

```bash
uv run modal deploy -m noauth.app
```

Notes:
- All endpoints require Modal Proxy Auth. Use a Proxy Auth token (`wk-...`/`ws-...`).
- API/CLI tokens (`ak-`/`as-`) are not valid for proxy auth.
