feat!: remove gitea command in favor of gt

Gitea login is handled by gt directly. The OAuth relay polling that atproto
shares moves to internal/relay.
This commit is contained in:
nandi committed 2026-11-21 16:31:42 -08:00
1 parent a1cfcc1de7
commit 8bc017ca72
6 files changed
+143 -541

No files matched your search

+3 -2
View File
@@ -1,10 +1,11 @@
# latha-auth
Zero-localhost OAuth CLI for remote VMs authenticating against Gitea (`git.site.latha.org`), Zitadel (`auth.site.latha.org`), and AT Protocol (any PDS).
Zero-localhost OAuth CLI for remote VMs authenticating against Zitadel (`auth.site.latha.org`), and AT Protocol (any PDS).
For Gitea (`git.site.latha.org`), use [`gt`](https://gitea.com/gitea/cli) directly: `gt auth login --host https://git.site.latha.org`, then `gt auth setup-git`.
## Commands
- `latha-auth gitea`: Authenticates with Gitea via PKCE + the `https://deploy.site.latha.org/oauth/callback` relay, logs in with `gt` ([gitea/cli](https://gitea.com/gitea/cli)), and runs `gt auth setup-git` to configure 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`). The client_id defaults to the metadata JSON served by gitea-k3s-deployer at `https://deploy.site.latha.org/oauth/atproto-client-metadata.json` (source copy versioned in this repo at `oauth/atproto-client-metadata.json`; regenerate with `latha-auth atproto --print-client-metadata` after scope/redirect changes, or override with `--client-id` / `LATHA_ATPROTO_CLIENT_ID`).