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?
image.png
Was this page helpful?