File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/main/services/mcp/oauth Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ import { loggerService } from '@logger'
44import { getConfigDir } from '@main/utils/file'
55import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth'
66import { OAuthClientInformation , OAuthClientInformationFull , OAuthTokens } from '@modelcontextprotocol/sdk/shared/auth'
7- import { sanitizeUrl } from 'strict-url-sanitise'
87import open from 'open'
8+ import { sanitizeUrl } from 'strict-url-sanitise'
99
1010import { JsonFileStorage } from './storage'
1111import { OAuthProviderOptions } from './types'
@@ -63,7 +63,7 @@ export class McpOAuthClientProvider implements OAuthClientProvider {
6363 async redirectToAuthorization ( authorizationUrl : URL ) : Promise < void > {
6464 try {
6565 // Open the browser to the authorization URL
66- await open ( authorizationUrl . toString ( ) )
66+ await open ( sanitizeUrl ( authorizationUrl . toString ( ) ) )
6767 logger . debug ( 'Browser opened automatically.' )
6868 } catch ( error ) {
6969 logger . error ( 'Could not open browser automatically.' )
You can’t perform that action at this time.
0 commit comments