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