chore: migrate OAuth services admin DDP methods to REST#40737
Conversation
Added two new REST endpoints completing the Custom OAuth admin surface:
- POST /v1/settings.removeCustomOAuth (removeOAuthService)
- POST /v1/settings.refreshOAuthServices (refreshOAuthService)
addOAuthService was already covered by the existing
POST /v1/settings.addCustomOAuth; its DDP method now also logs a
deprecation pointing there.
Method bodies extracted into the existing
apps/meteor/app/lib/server/methods/{remove,refresh}OAuthService.ts as
shared functions reused by both DDP entrypoints (now thin +
deprecation-logged) and the new REST handlers. Same add-oauth-service
permission + twoFactorRequired gates preserved.
Client OAuthGroupPage swapped from three useMethod hooks to three
useEndpoint hooks. addOAuthService now sends { name }, removeOAuthService
now sends { name }.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
🦋 Changeset detectedLatest commit: 55c0318 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #40737 +/- ##
===========================================
- Coverage 69.76% 69.71% -0.05%
===========================================
Files 3327 3327
Lines 123134 123134
Branches 21963 21951 -12
===========================================
- Hits 85902 85844 -58
- Misses 33873 33926 +53
- Partials 3359 3364 +5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
Continues the DDP→REST sweep (#40659, #40711, #40675, #40724, #40728, #40734, #40736). This batch migrates the three OAuth services admin DDP methods that backed the Admin → OAuth settings group. DDP methods stay registered for external SDK/mobile clients with deprecation logs pointing at the new routes.
Endpoints
addOAuthServicePOST /v1/settings.addCustomOAuthremoveOAuthServicePOST /v1/settings.removeCustomOAuth(new)add-oauth-serviceperm +twoFactorRequiredrefreshOAuthServicePOST /v1/settings.refreshOAuthServices(new)add-oauth-serviceperm +twoFactorRequiredImplementation
removeOAuthServiceMethod+refreshOAuthServiceMethodextracted from the DDP method files into exported functions, reused by both DDP entrypoints (now thin + deprecation-logged) and the REST handlers.add-oauth-servicepermission check +twoFactorRequiredgate as the existingsettings.addCustomOAuthendpoint.Client changes
OAuthGroupPage.tsxswapped from threeuseMethodhooks to threeuseEndpointhooks.addOAuthServicenow sends{ name };removeOAuthServicenow sends{ name }.Test plan
curland confirm 401/403 without theadd-oauth-serviceperm, 2FA prompt without a valid 2FA challenge🤖 Generated with Claude Code