feat: add config oauth-providers commands#72
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 wholeoauth_providersarray the wayconfig set oauth_providers/config applydo.removeconfirms first (skip with--yes). Client secrets stay server-side: providers are referenced byclientSecretEnvand 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_providersremains in the writable allowlist forconfig set/config apply.Testing
src/core/systemConfig.test.ts(list/create/update/delete + 400/404/409/500/403 mappings) andsrc/commands/config.test.ts(list/add/update/remove flows,--file,--yes, confirm-declined, invalid input).