UNPKG

redwood-clerk

Version:

Unofficial Clerk integration for RedwoodSDK

22 lines (20 loc) 635 B
import { env } from "cloudflare:workers"; import { createClerkClient } from "@clerk/backend"; import { isTruthy } from "@clerk/shared/underscore"; //#region src/server/clerk-client.ts const clerkClient = (options) => { return createClerkClient({ publishableKey: env.CLERK_PUBLISHABLE_KEY, secretKey: env.CLERK_SECRET_KEY, apiUrl: env.CLERK_API_URL || "https://api.clerk.com", apiVersion: env.CLERK_API_VERSION || "v1", jwtKey: env.CLERK_JWT_KEY, telemetry: { disabled: isTruthy(env.CLERK_TELEMETRY_DISABLED), debug: isTruthy(env.CLERK_TELEMETRY_DEBUG) }, ...options }); }; //#endregion export { clerkClient };