hono with better-auth
It should be a pretty straightforward setup, all I'm trying to do here is get the basic authentication working with better auth, I have the schema generated and everything but I keep having issues actually hitting the /api/auth routes.
Any idea why this might be an issue?
This is my setup:
=> app.ts
=> auth.ts
10 Replies
Also its important to note that the 404 response I'm getting is actually from the better-auth handler not my hono app.

I actually figured that out yes, when I hit sign up and sign in it actually work (POST), but doesn't better auth provide like GET requests? /session for example?
I tried GET /api/auth/session that also gave me 404
try
GET /api/auth/get-session
Well apparently I was not that smart, it works yeah.
you are amazing, thanks for the help
I'll need that link as well hah
ofc! does the link not work? here is is in plaintext https://github.com/better-auth/better-auth/blob/main/packages/better-auth/src/client/session-atom.ts
GitHub
better-auth/packages/better-auth/src/client/session-atom.ts at main...
The most comprehensive authentication framework for TypeScript - better-auth/better-auth
works perfectly, thank you!