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.