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.
4 lines
163 B
TypeScript
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);
|