UNPKG

better-auth

Version:

The most comprehensive authentication framework for TypeScript.

20 lines (19 loc) 497 B
import { PACKAGE_VERSION } from "../../version.mjs"; //#region src/plugins/jwt/client.ts const jwtClient = (options) => { const jwksPath = options?.jwks?.jwksPath ?? "/jwks"; return { id: "better-auth-client", version: PACKAGE_VERSION, $InferServerPlugin: {}, pathMethods: { [jwksPath]: "GET" }, getActions: ($fetch) => ({ jwks: async (fetchOptions) => { return await $fetch(jwksPath, { method: "GET", ...fetchOptions }); } }) }; }; //#endregion export { jwtClient };