Skip to content

docs(faq): fix incorrect file references in the Web Crypto answer#2205

Open
morgan-coded wants to merge 1 commit into
modelcontextprotocol:mainfrom
morgan-coded:docs/faq-fix-auth-extensions-and-vitest-setup-paths
Open

docs(faq): fix incorrect file references in the Web Crypto answer#2205
morgan-coded wants to merge 1 commit into
modelcontextprotocol:mainfrom
morgan-coded:docs/faq-fix-auth-extensions-and-vitest-setup-paths

Conversation

@morgan-coded
Copy link
Copy Markdown

What

Fixes two incorrect file references in the FAQ answer
"How do I enable Web Crypto (globalThis.crypto) for client authentication in older Node.js versions?" (docs/faq.md).

  • The answer pointed at packages/client/src/client/auth-extensions.ts, which
    does not exist. The actual file is
    packages/client/src/client/authExtensions.ts (camelCase, no hyphen) — it's
    the one that imports jose and implements private_key_jwt /
    client_credentials, matching the surrounding prose.
  • The answer also referred to "the SDK's own vitest.setup.ts", but there is no
    .ts setup file. The polyfill it describes lives at
    packages/client/vitest.setup.js — which this same answer already links
    correctly two lines earlier. The reference now matches.

Why

Both paths were dead links: a reader trying to open the cited source hits a
file that isn't there, which defeats the point of citing it. This corrects them
to the real files.

Scope

Docs-only. Two lines in docs/faq.md (+2 / -2). No package, runtime, public
API, or behavior change; no new dependencies; no changeset needed (top-level
docs change, no published package affected — consistent with other recent
docs(...) PRs).

Verification

  • Confirmed packages/client/src/client/authExtensions.ts and
    packages/client/vitest.setup.js exist on main, and the old hyphenated /
    .ts paths do not.
  • pnpm sync:snippets --check passes (the edited lines are prose, not
    source=-backed code fences).

The "How do I enable Web Crypto" FAQ answer referenced two files by
the wrong name:

- `packages/client/src/client/auth-extensions.ts` does not exist; the
  actual file is `packages/client/src/client/authExtensions.ts`
  (camelCase, no hyphen).
- `vitest.setup.ts` does not exist; the polyfill referenced lives at
  `packages/client/vitest.setup.js`, which the same answer already
  links correctly two lines above.

Corrects both references to the real paths so readers can find the
cited code. Docs-only; no package or behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@morgan-coded morgan-coded requested a review from a team as a code owner May 29, 2026 15:12
Copilot AI review requested due to automatic review settings May 29, 2026 15:12
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

⚠️ No Changeset found

Latest commit: 3416ff1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the FAQ entry about enabling Web Crypto in older Node.js versions by correcting internal file references used as examples.

Changes:

  • Updates the referenced OAuth auth helper file path to authExtensions.ts.
  • Updates the referenced SDK polyfill setup file from vitest.setup.ts to packages/client/vitest.setup.js.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread docs/faq.md
### How do I enable Web Crypto (`globalThis.crypto`) for client authentication in older Node.js versions?

The SDK’s OAuth client authentication helpers (for example, those in `packages/client/src/client/auth-extensions.ts` that use `jose`) rely on the Web Crypto API exposed as `globalThis.crypto`. This is especially important for **client credentials** and **JWT-based**
The SDK’s OAuth client authentication helpers (for example, those in `packages/client/src/client/authExtensions.ts` that use `jose`) rely on the Web Crypto API exposed as `globalThis.crypto`. This is especially important for **client credentials** and **JWT-based**
Comment thread docs/faq.md
as per your Node version documentation. (See https://nodejs.org/dist/latest-v18.x/docs/api/globals.html#crypto )

If you run clients on Node.js versions where `globalThis.crypto` is missing, you can polyfill it using the built-in `node:crypto` module, similar to the SDK's own `vitest.setup.ts`:
If you run clients on Node.js versions where `globalThis.crypto` is missing, you can polyfill it using the built-in `node:crypto` module, similar to the SDK's own `packages/client/vitest.setup.js`:
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 29, 2026

Open in StackBlitz

@modelcontextprotocol/client

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/client@2205

@modelcontextprotocol/codemod

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/codemod@2205

@modelcontextprotocol/server

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/server@2205

@modelcontextprotocol/express

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/express@2205

@modelcontextprotocol/fastify

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/fastify@2205

@modelcontextprotocol/hono

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/hono@2205

@modelcontextprotocol/node

npm i https://pkg.pr.new/modelcontextprotocol/typescript-sdk/@modelcontextprotocol/node@2205

commit: 3416ff1

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