Add multi-plugin OAuth connect UI#1163
Conversation
|
Vorflux skipped this auto review because this account has reached its Auto Review daily review limit (10/10). You can change this in Auto Review Settings: https://us1.vorflux.com/supermemory/settings?section=pull-requests |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-mcp | d247ff6 | Jun 26 2026, 02:35 PM |
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
supermemory-app | d247ff6 | Commit Preview URL Branch Preview URL |
Jun 26 2026, 02:37 PM |
|
Claude finished @ishaanxgupta's task in 2m 55s —— View job Code Review Complete
Overview: This PR adds multi-plugin OAuth UI that shows stacked plugin logos, handles plan-gating, and returns structured Issues found: 1 bug — invalid client IDs can bypass validation when a Pro user uses the single Score: 8/10 — Solid implementation overall. The plan-gating logic, loading state handling, and multi-client response format are well done. One subtle regression on the single-client path that's easy to fix. |
There was a problem hiding this comment.
Overview: Adds multi-plugin OAuth UI that shows stacked plugin logos, handles plan-gating, and returns structured keys/errors to the CLI callback.
Issues found:
- Invalid client IDs can bypass validation when a Pro user uses the single
?client=parameter (see inline comment with fix)
Score: 8/10
The implementation is solid overall — the plan-gating logic, loading state handling, and multi-client response format are all well done. The one issue is a subtle regression where invalid client IDs slip through for Pro users on the single-client path. Easy fix with the suggested change.
| .split(",") | ||
| .map((value) => value.trim()) | ||
| .filter((value) => value in PLUGIN_INFO) | ||
| const requestedClients = clients.length > 0 ? clients : client ? [client] : [] |
There was a problem hiding this comment.
Bug: Invalid client IDs bypass validation for Pro users
When using the single client parameter (not clients), raw unvalidated values are included in requestedClients. The clients array properly filters to valid plugin IDs (value in PLUGIN_INFO), but this fallback uses the raw client value.
This causes a problem when a Pro user visits ?client=invalid_id:
requestedClients = ["invalid_id"]eligibleClientsfilter passes becausehasProProduct || isFreeTierPlugin(...)→ Pro users pass everything- API receives
client=invalid_idwhich could cause server errors
The original code avoided this by using validClient (which is null for invalid clients).
| const requestedClients = clients.length > 0 ? clients : client ? [client] : [] | |
| const requestedClients = clients.length > 0 ? clients : validClient ? [validClient] : [] |
Summary
/auth/connectUI for plugin OAuth requests withclients=....keysfor eligible clients anderrorsfor plan-gated clients to the CLI callback.