diff --git a/apps/web/src/pages/api/auth/[...all].ts b/apps/web/src/pages/api/auth/[...all].ts index dd677d59..e384c9c2 100644 --- a/apps/web/src/pages/api/auth/[...all].ts +++ b/apps/web/src/pages/api/auth/[...all].ts @@ -1,8 +1,12 @@ import { toNodeHandler } from "better-auth/node"; -import { auth } from "@kan/auth"; +import { initAuth } from "@kan/auth"; +import { createDrizzleClient } from "@kan/db/client"; export const config = { api: { bodyParser: false } }; + +const auth = initAuth(createDrizzleClient()); + export default toNodeHandler(auth.handler); // export const runtime = "edge";