File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
packages/opencode/src/mcp Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,7 @@ export namespace MCP {
226226 {
227227 onRedirect : async ( url ) => {
228228 log . info ( "oauth redirect requested" , { key, url : url . toString ( ) } )
229+ // Store the URL - actual browser opening is handled by startAuth
229230 } ,
230231 } ,
231232 actualPort ,
@@ -284,7 +285,7 @@ export namespace MCP {
284285 duration : 8000 ,
285286 } ) . catch ( ( e ) => log . debug ( "failed to show toast" , { error : e } ) )
286287 } else {
287- // Normal auth needed
288+ // Store transport for later finishAuth call
288289 pendingOAuthTransports . set ( key , transport )
289290 status = { status : "needs_auth" as const }
290291 // Show toast for needs_auth
@@ -551,8 +552,8 @@ export namespace MCP {
551552 // If we get here, we're already authenticated
552553 return { authorizationUrl : "" }
553554 } catch ( error ) {
554- // Normal auth flow
555555 if ( error instanceof UnauthorizedError && capturedUrl ) {
556+ // Store transport for finishAuth
556557 pendingOAuthTransports . set ( mcpName , transport )
557558 return { authorizationUrl : capturedUrl . toString ( ) }
558559 }
You can’t perform that action at this time.
0 commit comments