NestJs + Better Auth
I followed all the step-by-step instructions from Better Auth for NestJs, but even though the console shows
[Nest] 36 - 09/08/2025, 1:02:55 PM LOG [AuthModule] AuthModule initialized BetterAuth on '/api/auth/*,
when I try to make a request to /api/auth/ok, I get a message saying the route was not found.
5 Replies
I found this PR about the same issue I’m facing, but in theory it should have already been resolved.
https://github.com/ThallesP/nestjs-better-auth/issues/20
GitHub
/api/auth/* always return 404 · Issue #20 · ThallesP/nestjs-bet...I am encountering an issue where all requests to endpoints under the /api/auth/* path result in a 404 Not Found error.This occurs even with a minimal project setup using better-auth and nestjs-bett...
if there is path mentioned on baseURL , basePath will be ignored
I managed to solve the problem! Thank you very much!