History

mcp: allow null clientInformation on connection provider_state

Early-onboarded MCP sources stored a legacy oauth2 auth shape where `clientInformation` was null — DCR completed at sign-in time but was never persisted back onto the source. The refactor made `clientInformation` required on `OAuth2ProviderState`, which meant those rows couldn't be migrated and couldn't load in the UI. Make it nullable + fail refresh cleanly with a re-sign-in message when absent. The migration now passes null through so the source loads with the pointer shape; the user can hit Reconnect to run fresh DCR.

Rhys Sullivan committed 6 months ago

Commit e78249c1 parent 3c74de23 files · +14 −17Browse files

Showing the changes to apps/cloud/scripts (1 of 3 files). Show all

Unified · Split

apps/cloud/scripts/migrate-mcp-connections.ts+1−9
@@ -97,14 +97,6 @@ const classifyRow = (row: Row): Bucket => { · 96 unmodified lines
97 reason: "config.endpoint missing",97 reason: "config.endpoint missing",
98 };98 };
99 }99 }
100 if (legacy.clientInformation === null) {
101 return {
102 kind: "legacy-blocked",
103 row,
104 legacy,
105 reason: "clientInformation missing — DCR never completed",
106 };
107 }
108 return { kind: "legacy-migratable", row, legacy, endpoint };100 return { kind: "legacy-migratable", row, legacy, endpoint };
109 }101 }
110 102
@@ -230,7 +222,7 @@ const main = async () => { · 119 unmodified lines
230 const providerState = {222 const providerState = {
231 endpoint: b.endpoint,223 endpoint: b.endpoint,
232 tokenType: l.tokenType,224 tokenType: l.tokenType,
233 clientInformation: l.clientInformation!,225 clientInformation: l.clientInformation,
234 authorizationServerUrl: l.authorizationServerUrl,226 authorizationServerUrl: l.authorizationServerUrl,
235 authorizationServerMetadata: null,227 authorizationServerMetadata: null,
236 resourceMetadataUrl: l.resourceMetadataUrl,228 resourceMetadataUrl: l.resourceMetadataUrl,

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t