feat: host atproto client metadata from this repo via Gitea raw

Default client_id now points at oauth/atproto-client-metadata.json in
this repository, served at
https://git.site.latha.org/experiments/latha-auth/raw/branch/main/oauth/atproto-client-metadata.json
so no separate deploy is needed before first login.
This commit is contained in:
nandi committed 2026-11-18 06:53:47 +00:00
1 parent fb79db4e21
commit 5772bedb88
4 files changed
+27 -8

No files matched your search

+1 -1
View File
@@ -7,7 +7,7 @@ Zero-localhost OAuth CLI for remote VMs authenticating against Gitea (`git.site.
- `latha-auth gitea`: Authenticates with Gitea via PKCE + the `https://deploy.site.latha.org/oauth/callback` relay, configures `tea login` (`latha`), and sets up git credentials.
- `latha-auth k3s`: Runs Zitadel OAuth 2.0 Device Code flow for K3s Headlamp (`dash.latha.org`, `client_id=400047321930268787`) and saves the token to `~/.config/latha-auth/k3s-token.json` (`0600`).
- `latha-auth oidc --client-id <id> [--scope "..."] [--out <path>]`: Generic Zitadel Device Code flow for any `auth.site.latha.org` service.
- `latha-auth atproto --identifier <handle|did> [--scope "..."] [--out <path>]`: AT Protocol OAuth (PAR + PKCE + DPoP) as a public client, collecting the code via the same deploy relay. Saves the session — tokens plus the DPoP private key they are bound to — to `~/.config/latha-auth/atproto-session.json` (`0600`). One-time setup: host the output of `latha-auth atproto --print-client-metadata` at the client_id URL (default `https://deploy.site.latha.org/oauth/atproto-client-metadata.json`, override with `--client-id` or `LATHA_ATPROTO_CLIENT_ID`).
- `latha-auth atproto --identifier <handle|did> [--scope "..."] [--out <path>]`: AT Protocol OAuth (PAR + PKCE + DPoP) as a public client, collecting the code via the same deploy relay. Saves the session — tokens plus the DPoP private key they are bound to — to `~/.config/latha-auth/atproto-session.json` (`0600`). The client_id defaults to the metadata JSON versioned in this repo at `oauth/atproto-client-metadata.json` (served via Gitea raw; regenerate with `latha-auth atproto --print-client-metadata` after scope/redirect changes, or override with `--client-id` / `LATHA_ATPROTO_CLIENT_ID`).
- `latha-auth atproto-token [--refresh] [--json]`: Prints a valid access token from the saved session, refreshing in place when expired. Note tokens are DPoP-bound: consumers must sign per-request DPoP proofs with the session key, so this is for DPoP-aware tooling.
## Install