8000 `req.session.destroy()` does not remove cookies with the latest version of NextJS when hosting on Vercel · Issue #274 · vvo/iron-session · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
req.session.destroy() does not remove cookies with the latest version of NextJS when hosting on Vercel #274
@dpyzo0o

Description

@dpyzo0o

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:

  1. login
  2. logout (first time it will succeed with a 200 return)
  3. login again
  4. logout (this time it will fail to remove the cookie with a 304 return)

next-iron-session's nextjs example:

1607513150016

after upgrading nextjs to 10.0.3:

1607513145304

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0