Skip to content

fix(mcp): stop idle OAuth callback server#32245

Open
rekram1-node wants to merge 1 commit into
devfrom
oauth-cleanup
Open

fix(mcp): stop idle OAuth callback server#32245
rekram1-node wants to merge 1 commit into
devfrom
oauth-cleanup

Conversation

@rekram1-node

Copy link
Copy Markdown
Collaborator

Summary

  • stop the MCP OAuth callback listener after the final callback succeeds, returns a provider error, is cancelled, or times out
  • register authenticate callbacks before listener startup and serialize listener start/stop transitions so concurrent flows cannot strand or lose the listener
  • preserve configured callback ports and redirect paths while covering lifecycle and concurrency behavior with focused tests

Tests

  • bun test test/mcp/oauth-callback.test.ts test/mcp/oauth-browser.test.ts test/mcp/lifecycle.test.ts --timeout 30000 (45 pass)
  • bun test test/mcp/oauth-callback.test.ts --timeout 30000 after formatting (11 pass)

Closes #23568
Closes #23563
Related to #28567
Related to #30888

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant