From 98ea603b64ad6327e3769ddbe21c5e6800d0155b Mon Sep 17 00:00:00 2001 From: Dylan Vanmali Date: Fri, 9 Jan 2026 11:51:53 -0800 Subject: [PATCH] chore: op plugin test fail (#7225) --- packages/oauth-provider/src/utils/index.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/oauth-provider/src/utils/index.ts b/packages/oauth-provider/src/utils/index.ts index f9dcbd26e8..f2ab031dab 100644 --- a/packages/oauth-provider/src/utils/index.ts +++ b/packages/oauth-provider/src/utils/index.ts @@ -52,7 +52,11 @@ export const getOAuthProviderPlugin = (ctx: AuthContext) => { * @internal */ export const getJwtPlugin = (ctx: AuthContext) => { - return ctx.getPlugin("jwt") satisfies ReturnType | null; + const plugin = ctx.getPlugin("jwt") satisfies ReturnType | null; + if (!plugin) { + throw new BetterAuthError("jwt_config", "jwt plugin not found"); + } + return plugin; }; const cachedTrustedClients = new TTLCache>();