From 3416ff1cd6f56a34ba281dc566631be943d37a84 Mon Sep 17 00:00:00 2001 From: morgan-coded <256248948+morgan-coded@users.noreply.github.com> Date: Fri, 29 May 2026 01:28:44 -0500 Subject: [PATCH] docs(faq): fix incorrect file references in Web Crypto answer 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) --- docs/faq.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/faq.md b/docs/faq.md index ab237f6a2a..47c5dcad77 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -40,14 +40,14 @@ Once your project is using a single, compatible `zod` version, the `TS2589` erro ### 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** authentication flows used by MCP clients. - **Node.js v19.0.0 and later**: `globalThis.crypto` is available by default. - **Node.js v18.x**: `globalThis.crypto` may not be defined by default. In this repository we polyfill it for tests (see `packages/client/vitest.setup.js`), and you should do the same in your app if it is missing – or alternatively, run Node with `--experimental-global-webcrypto` 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`: ```typescript import { webcrypto } from 'node:crypto';