Cannot use useSession hook
Hello, I use Better Auth with Next.js. I use the Discord provider and it works but when I want to retrieve the user's session, my IDE tells me that
authClient.useSession
is not callable and I got this in my browser's console:
GET http://localhost:3000/api/auth/use-session 404 (Not Found)
.
My file src/app/api/auth/[...all]/route.ts
looks like this:
src/app/page.tsx
/src/auth.ts
src/auth-client.ts
I run on localhost:3000
Thanks for help!2 Replies