mirror of
https://github.com/bitbaum/orangecat.git
synced 2026-12-05 11:08:20 +01:00
The FleetCrown oauth_clients row was previously inserted ad-hoc with no committed tooling. Add scripts/oauth/register-client.ts as the SSOT for it: - owner-gated (ORANGECAT_OWNER_SEED=1), runs against the self-hosted DB via the service-role admin client; - idempotent upsert by client_id — refreshes non-secret fields every run so config drift is corrected, leaves the secret untouched unless --rotate; - least-privilege FleetCrown spec (1 redirect, 7 scopes) validated against the OAuth scope registry SSOT (parseAndValidateScopes); FLEETCROWN_REDIRECT_URIS appends dev/preview origins; - prints the plaintext secret once on creation/rotation for out-of-band handoff. Mirrors the integration_keys hash+revocation model and the seed-script convention (seed-revive-my-old-ride.ts). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>