404 Auth Handler
I have spent hours trying to debug this, and I feel like I'm about to go crazy. I have an existing Elysia app with tRPC where I'm trying to add Better Auth. When I click my Sign Up button, I make a POST request to http://localhost:3002/api/v1/auth/sign-up/email but it returns 404. Any help would be greatly appreciated!
Solution:Jump to solution
SOLUTION:
I simplified my Elysia app to include basically nothing but the auth view. Once I did that, I got a 403 because the origin was wrong. The culprit was simply adding
baseURL: env.NEXT_PUBLIC_BASE_URL,
to the Better Auth object....2 Replies
Here is a simplified version of what I'm trying to get working.
Solution
SOLUTION:
I simplified my Elysia app to include basically nothing but the auth view. Once I did that, I got a 403 because the origin was wrong. The culprit was simply adding
baseURL: env.NEXT_PUBLIC_BASE_URL,
to the Better Auth object.