(accessToken: string)
| 481 | // --------------------------------------------------------------------------- |
| 482 | |
| 483 | const makeOAuthProvider = (accessToken: string): OAuthClientProvider => ({ |
| 484 | get redirectUrl() { |
| 485 | return "http://localhost/oauth/callback"; |
| 486 | }, |
| 487 | get clientMetadata() { |
| 488 | return { |
| 489 | redirect_uris: ["http://localhost/oauth/callback"], |
| 490 | grant_types: ["authorization_code", "refresh_token"] as string[], |
| 491 | response_types: ["code"] as string[], |
| 492 | token_endpoint_auth_method: "none" as const, |
| 493 | client_name: "Executor", |
| 494 | }; |
| 495 | }, |
| 496 | clientInformation: () => undefined, |
| 497 | saveClientInformation: () => undefined, |
| 498 | tokens: () => ({ access_token: accessToken, token_type: "Bearer" }), |
| 499 | saveTokens: () => undefined, |
| 500 | redirectToAuthorization: async () => { |
| 501 | // oxlint-disable-next-line executor/no-try-catch-or-throw -- boundary: MCP SDK OAuthClientProvider callback can only signal reauthorization by throwing |
| 502 | throw new McpOAuthReauthorizationRequired({ |
| 503 | message: "MCP OAuth re-authorization required", |
| 504 | }); |
| 505 | }, |
| 506 | saveCodeVerifier: () => undefined, |
| 507 | codeVerifier: () => { |
| 508 | // oxlint-disable-next-line executor/no-try-catch-or-throw, executor/no-error-constructor -- boundary: MCP SDK OAuthClientProvider callback requires a thrown verifier failure |
| 509 | throw new Error("No active PKCE verifier"); |
| 510 | }, |
| 511 | saveDiscoveryState: () => undefined, |
| 512 | discoveryState: () => undefined, |
| 513 | }); |
| 514 | |
| 515 | // --------------------------------------------------------------------------- |
| 516 | // Connector input — render the integration config + the connection's resolved |
no outgoing calls
no test coverage detected