bagsy/apps/api/app/api/auth/[...all]/route.ts
bananabas 094853c9da Fix: Use toNextJsHandler from better-auth for Next.js 16 route handler
The auth endpoint was returning 404 because the route handler wasn't
properly using better-auth's Next.js integration. Use toNextJsHandler()
to properly export the handlers.
2026-04-13 19:14:39 +01:00

4 lines
163 B
TypeScript

import { auth } from '@/lib/auth';
import { toNextJsHandler } from 'better-auth/next-js';
export const { GET, POST, PUT, PATCH, DELETE } = toNextJsHandler(auth);