Im using the better-auth in a non-nextjs server to verify session and see this error.
error Cannot find module '/app/node_modules/next/headers' imported from /app/node_modules/better-auth/dist/integrations/next-js.cjs
Did you mean to import "next/headers.js"?
4 Replies
how can I fix this? Seems like better-auth it's trying to import next/headers in a non next-js environment. This should not happen
just pass headers to it.
for example this hono's header:
Im passing headers
any luck with this?
im on t3 stack w pages router, trynna integrate better-auth.