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
9797 reason: "config.endpoint missing",
9898 };
9999 }
100− if (legacy.clientInformation === null) {
101− return {
102− kind: "legacy-blocked",
103− row,
104− legacy,
105− reason: "clientInformation missing — DCR never completed",
106− };
107− }
108100 return { kind: "legacy-migratable", row, legacy, endpoint };
109101 }
110102
@@ -230,7 +222,7 @@ const main = async () => { · 119 unmodified lines
230222 const providerState = {
231223 endpoint: b.endpoint,
232224 tokenType: l.tokenType,
233− clientInformation: l.clientInformation!,
225+ clientInformation: l.clientInformation,
234226 authorizationServerUrl: l.authorizationServerUrl,
235227 authorizationServerMetadata: null,
236228 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