// Node-runnable copy of the auth config, used only by the Better Auth CLI // (`auth generate`) to introspect plugins and emit the Drizzle // schema. Not imported by the worker. // // Re-exporting `makeAuth(stubEnv)` so the CLI sees an `auth` instance with // the same plugin set as production. The stub env never has its bindings // dereferenced because the CLI only inspects the plugin tree. import { makeAuth } from "@/worker/auth"; const stubEnv = { BETTER_AUTH_SECRET: "0".repeat(64), BETTER_AUTH_URL: "https://auth.limic.dev", OIDC_ISSUER: "https://auth.limic.dev", GITHUB_OAUTH_CLIENT_ID: "", GITHUB_OAUTH_CLIENT_SECRET: "", GOOGLE_OAUTH_CLIENT_ID: "", GOOGLE_OAUTH_CLIENT_SECRET: "", TURNSTILE_SITE_KEY: "", TURNSTILE_SECRET_KEY: "", BOOTSTRAP_ADMIN_EMAIL: "", DB: undefined as unknown as D1Database, RL_AUTH: undefined as unknown as RateLimit, RL_API: undefined as unknown as RateLimit, ASSETS: undefined as unknown as Fetcher, } as unknown as Env; export const auth = makeAuth(stubEnv, { baseURL: "https://auth.limic.dev", issuer: "https://auth.limic.dev", });