Next.js middleware not able to read better auth session token
I have the my Nest.js backend running on digital ocean vps with custom domain. The frontend is built with next.js, when I try to login in the application, I cookies are getting set as you see in the image, but the next.js middleware is not able to read/get the session cookies.
This is working super good when we are running the backend on localhost, but on deployment this is happening. I have updated cookie settings with secure = true, samesite = none, httpOnly = false, partition = true.
What am I missing?

3 Replies
Hey do I need to keep both frontend and backend on the same domain to allow this.
i have the same issue, and this help me:
https://discord.com/channels/1288403910284935179/1415884129203126412
Thanks man !!
I ended using same domain for both frontend and backend and it was working
but atleast now I now how to work with different domains !!