From 512a90e2cd8e4e24e70a197f2b5ee3932f6a3ecd Mon Sep 17 00:00:00 2001 From: Maxwell <145994855+ping-maxwell@users.noreply.github.com> Date: Mon, 24 Nov 2025 06:26:03 +1000 Subject: [PATCH] chore: remove out-dated `client: false` (#6243) --- .../plugins/api-key/routes/delete-all-expired-api-keys.ts | 1 - packages/better-auth/src/plugins/generic-oauth/index.ts | 3 ++- packages/better-auth/src/plugins/mcp/index.ts | 5 +++-- packages/passkey/src/index.ts | 1 - 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/better-auth/src/plugins/api-key/routes/delete-all-expired-api-keys.ts b/packages/better-auth/src/plugins/api-key/routes/delete-all-expired-api-keys.ts index 70f4ce6d8b..e19705aea8 100644 --- a/packages/better-auth/src/plugins/api-key/routes/delete-all-expired-api-keys.ts +++ b/packages/better-auth/src/plugins/api-key/routes/delete-all-expired-api-keys.ts @@ -15,7 +15,6 @@ export function deleteAllExpiredApiKeysEndpoint({ method: "POST", metadata: { SERVER_ONLY: true, - client: false, }, }, async (ctx) => { diff --git a/packages/better-auth/src/plugins/generic-oauth/index.ts b/packages/better-auth/src/plugins/generic-oauth/index.ts index 7f386c96e7..f023fefece 100644 --- a/packages/better-auth/src/plugins/generic-oauth/index.ts +++ b/packages/better-auth/src/plugins/generic-oauth/index.ts @@ -24,6 +24,7 @@ import { setSessionCookie } from "../../cookies"; import { handleOAuthUserInfo } from "../../oauth2/link-account"; import { generateState, parseState } from "../../oauth2/state"; import type { User } from "../../types"; +import { HIDE_METADATA } from "../../utils"; import { GENERIC_OAUTH_ERROR_CODES } from "./error-codes"; export * from "./providers"; @@ -641,7 +642,7 @@ export const genericOAuth = (options: GenericOAuthOptions) => { .optional(), }), metadata: { - client: false, + ...HIDE_METADATA, allowedMediaTypes: [ "application/x-www-form-urlencoded", "application/json", diff --git a/packages/better-auth/src/plugins/mcp/index.ts b/packages/better-auth/src/plugins/mcp/index.ts index 868b9f2e49..dabc5a9b80 100644 --- a/packages/better-auth/src/plugins/mcp/index.ts +++ b/packages/better-auth/src/plugins/mcp/index.ts @@ -16,6 +16,7 @@ import * as z from "zod"; import { APIError, getSessionFromCtx } from "../../api"; import { parseSetCookieHeader } from "../../cookies"; import { generateRandomString } from "../../crypto"; +import { HIDE_METADATA } from "../../utils"; import { getBaseURL } from "../../utils/url"; import type { Client, @@ -191,7 +192,7 @@ export const mcp = (options: MCPOptions) => { { method: "GET", metadata: { - client: false, + ...HIDE_METADATA, }, }, async (c) => { @@ -209,7 +210,7 @@ export const mcp = (options: MCPOptions) => { { method: "GET", metadata: { - client: false, + ...HIDE_METADATA, }, }, async (c) => { diff --git a/packages/passkey/src/index.ts b/packages/passkey/src/index.ts index 5d09dfb6ba..68ecc66520 100644 --- a/packages/passkey/src/index.ts +++ b/packages/passkey/src/index.ts @@ -60,7 +60,6 @@ export const passkey = (options?: PasskeyOptions | undefined) => { }) .optional(), metadata: { - client: false, openapi: { operationId: "generatePasskeyRegistrationOptions", description: "Generate registration options for a new passkey",