Skip to content

fix: forward browser auth options in createMcpConnection - #8

Merged
koistya merged 4 commits into
kriasoft:mainfrom
zenyr:fix/store-key
Sep 30, 2026
Merged

koistya merged 4 commits into
kriasoft:mainfrom
zenyr:fix/store-key

Conversation

@zenyr

@zenyr zenyr commented Mar 21, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • forward the full BrowserAuthOptions set from createMcpConnection() to browserAuth()
  • preserve existing browser auth defaults while honoring caller-provided overrides such as storeKey
  • add regression tests for option passthrough and default preservation

Why

createMcpConnection() was only forwarding a subset of browser auth options, so some caller-provided auth configuration was silently ignored. This could cause token storage and other browser auth behavior to fall back to defaults instead of using the caller's configuration.

Validation

  • bun run validate

zenyr and others added 4 commits March 21, 2026 16:38
createMcpConnection() rebuilt the browserAuth() options from a fixed list,
silently dropping storeKey, successHtml, errorHtml, onRequest and
authServerUrl. browserAuth() already applies the same defaults, so the
config is now passed through as-is; this also stops || from overriding
explicit falsy values.

The regression test asserts a token stored under a custom storeKey is sent
to the server. Tests now run with --isolate: introspection.test.ts mocks
./mcp-client.js via mock.module(), which otherwise leaks into other files.
@koistya
koistya merged commit 7ba9c86 into kriasoft:main Sep 30, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants