Skip to content

feat: add config oauth-providers commands#72

Merged
Bccorb merged 1 commit into
mainfrom
feat/config-oauth-providers
Jul 21, 2026
Merged

feat: add config oauth-providers commands#72
Bccorb merged 1 commit into
mainfrom
feat/config-oauth-providers

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds seamless config oauth-providers <list|add|update|remove> for per-provider OAuth management, backed by the auth API's dedicated provider routes (see fells-code/seamless-auth-api#95):

  • config oauth-providers list [--json]
  • config oauth-providers add '<json>' | --file <path>
  • config oauth-providers update <id> '<json>' | --file <path>
  • config oauth-providers remove <id> [--yes]

Each command targets a single provider via POST/PATCH/DELETE /system-config/oauth-providers[/:id], so concurrent edits no longer clobber the whole oauth_providers array the way config set oauth_providers / config apply do. remove confirms first (skip with --yes). Client secrets stay server-side: providers are referenced by clientSecretEnv and the value is never sent.

The CLI talks directly to the API with a Bearer token (no adapter), so no transport changes were needed. The existing whole-config editor commands are unchanged, and oauth_providers remains in the writable allowlist for config set / config apply.

Testing

  • New unit tests in src/core/systemConfig.test.ts (list/create/update/delete + 400/404/409/500/403 mappings) and src/commands/config.test.ts (list/add/update/remove flows, --file, --yes, confirm-declined, invalid input).
  • Full suite green (583 passing) and coverage gate met (99.78% lines, 96.47% branches) via the pre-commit hook.

Add seamless config oauth-providers <list|add|update|remove> for per-provider
OAuth management, backed by the auth API's dedicated provider routes
(GET/POST /system-config/oauth-providers, PATCH/DELETE
/system-config/oauth-providers/:id). Each command touches a single provider, so
concurrent edits no longer clobber the whole oauth_providers array the way
config set oauth_providers / config apply do. add and update accept inline JSON
or --file <path>; remove confirms first (skip with --yes). Client secrets stay
server-side: providers reference clientSecretEnv and the value is never sent.
@Bccorb
Bccorb merged commit ae2be5d into main Jul 21, 2026
1 check failed
@Bccorb
Bccorb deleted the feat/config-oauth-providers branch July 21, 2026 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant