Skip to content

feat: proxy OAuth provider admin routes#112

Merged
Bccorb merged 1 commit into
mainfrom
feat/oauth-provider-admin-routes
Jul 21, 2026
Merged

feat: proxy OAuth provider admin routes#112
Bccorb merged 1 commit into
mainfrom
feat/oauth-provider-admin-routes

Conversation

@Bccorb

@Bccorb Bccorb commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Proxies the auth API's new OAuth provider admin routes (see fells-code/seamless-auth-api#95):

  • GET/POST /system-config/oauth-providers
  • PATCH/DELETE /system-config/oauth-providers/:id

All are gated on the access identity via proxyWithIdentity in createServer.ts, matching the existing /system-config/* admin routes.

@seamless-auth/core: registers /system-config/oauth-providers in the ensureCookies cookie-requirements table. The table is matched by prefix, so the single entry covers both the collection and the id-scoped routes. Without it, ensureCookies never populates req.cookiePayload, so the proxy would not attach the access token and the routes fail closed.

Testing

  • New jest suite packages/express/tests/oauthProvidersProxy.test.js (5 tests) covering list/create/update/delete forwarding and the unauthenticated case.
  • @seamless-auth/core (83) and @seamless-auth/express (132) suites pass.

Proxy the auth API's new OAuth provider admin routes: GET/POST
/system-config/oauth-providers and PATCH/DELETE /system-config/oauth-providers/:id,
all gated on the access identity. Register /system-config/oauth-providers in the
core cookie requirements table so ensureCookies attaches the access token for both
the collection and the id-scoped routes; without it the proxy never populates
req.cookiePayload and the routes fail closed.
@Bccorb
Bccorb merged commit 3296263 into main Jul 21, 2026
1 of 2 checks passed
@Bccorb
Bccorb deleted the feat/oauth-provider-admin-routes branch July 21, 2026 18:36
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