feat: add admin routes to manage OAuth providers at runtime#95
Merged
Conversation
Add GET/POST/PATCH/DELETE /system-config/oauth-providers so admins can list, add, update, and remove OAuth providers without hand-editing system_config or replacing the whole oauth_providers array. Each mutation validates against OAuthProviderConfigSchema, invalidates the system-config cache, and records a system_config_updated audit event. Client secrets stay out of the API surface: providers reference clientSecretEnv and the routes never accept or return a raw secret. The existing whole-array PATCH /system-config/admin path is unchanged. Closes #62
This was referenced Jul 21, 2026
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
Closes #62. Adds admin-scoped routes to manage OAuth providers at runtime, so admins can list, add, update, and remove providers without hand-editing
system_configor replacing the wholeoauth_providersarray.New routes on the SystemConfig admin surface:
GET /system-config/oauth-providers(list,requireAdmin('read'))POST /system-config/oauth-providers(add, 409 on duplicate id)PATCH /system-config/oauth-providers/:id(update, 404 on unknown id)DELETE /system-config/oauth-providers/:id(remove, 404 on unknown id)Mutations require
requireAdmin('write'), validate againstOAuthProviderConfigSchema, invalidate the system-config cache, and record asystem_config_updatedaudit event. Client secrets stay out of the API surface: providers referenceclientSecretEnv(the env var name) and the routes never accept or return a raw secret.The existing whole-array
PATCH /system-config/adminpath is unchanged, so this is additive. The per-provider routes exist to give concurrency-safe, single-provider semantics (no last-write-wins clobber on the shared array) plus dedicated OpenAPI coverage.Contract impact (ripple)
This is a contract change (new routes). Coordinated PRs:
seamless-auth-server: adds proxy passthroughs + a core cookie-requirements entry for the new paths.seamless-auth-admin-dashboard: migrates the provider editor to the per-provider routes.Testing
tests/integration/systemConfig/oauthProviders.spec.ts.