`req.session.destroy()` does not remove cookies with the latest version of NextJS when hosting on Vercel · Issue #274 · vvo/iron-session · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I have come across a very annoying bug recently. If you upgrade nextjs to the latest version, which is 10.0.3, and deploy the application on Vercel, the method req.session.destroy() does not remove the cookies.
Here is a repo to reproduce this issue, it's just a redeployment of the next-icon-session's nextjs example but with nextjs upgraded to 10.0.3.
Steps to reproduce:
login
logout (first time it will succeed with a 200 return)
login again
logout (this time it will fail to remove the cookie with a 304 return)
next-iron-session's nextjs example:
after upgrading nextjs to 10.0.3:
Additional information: This issue only happens when deploying on vercel, it works correctly when I run it locally.
Edit: After downgrading nextjs to 10.0.0, it works correcly on vercel.