session always returns null
First post here! Any help/correction would be appreciated!!
When i try to get the session using authClient.getSession(), for localhost (backend) I am able to retrieve the sessions details. But when my backend application is deployed on a linode server, session is always null.
I noticed that when my application (backend) was running locally the Cookie was present in the request headers and am able to get session data. But when this same application (backend) was hosted on Linode the Cookie was not present in the request headers and session is always null.
I'm using React and hosting it on Vercel.
hono:
react:
and then using it in the __root.tsx (tanstack router) in this way :
to make use of this in all my other routes wherever necessary.
Any help would be appreciated!
Thanks in advance 🙏
1 Reply