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.
Showing the changes to apps/cloud/scripts (1 of 3 files). Show all
Unified · Split
| @@ -97,14 +97,6 @@ const classifyRow = (row: Row): Bucket => { · 96 unmodified lines | ||
| 97 | 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 | 100 | return { kind: "legacy-migratable", row, legacy, endpoint }; |
| 109 | 101 | } |
| 110 | 102 | |
| @@ -230,7 +222,7 @@ const main = async () => { · 119 unmodified lines | ||
| 230 | 222 | const providerState = { |
| 231 | 223 | endpoint: b.endpoint, |
| 232 | 224 | tokenType: l.tokenType, |
| 233 | − clientInformation: l.clientInformation!, | |
| 225 | + clientInformation: l.clientInformation, | |
| 234 | 226 | authorizationServerUrl: l.authorizationServerUrl, |
| 235 | 227 | authorizationServerMetadata: null, |
| 236 | 228 | resourceMetadataUrl: l.resourceMetadataUrl, |