I had a nextjs project with better auth, worked fine
I had to migrate and move to tanstack router and hono, but auth doesnt seem to work, idk if it doesnt work when server and frontend each run on a different port
my frontend is on localhost:3001
my server is on localhost:3000
when a user logs in a cookie is set, but when i try to fetch the session it returns null, even tho session was created in db and returned in the signin api call
in my nextjs project when i login 4 cookies are set, so everything works perfectly.
here are the code snippets: