Skip to content

v4: Infinitely stacking cookies #1917

Open
@mvvmm

Description

@mvvmm

Checklist

Description

  • v4 sdk creates a new additional transactional cookie each time the unauthenticated user navigates to the app
  • v4 logout does not remove said cookies

v3 does not create infinite cookies and does remove cookies on logout.

This eventually leads to a situation where the header of the request is too large.

Reproduction

  1. Be unauthenticated in your application (remove all cookies on that domain if you want)
  2. Navigate to a route in your application (receive a cookie)
  3. Navigate to another route in your application (receive another cookie)
  4. Repeat as many times as you wish
  5. Navigate to /auth/logout (receive another cookie, and cookies are not removed)
infinite.cookies.mp4

Additional context

N/A

nextjs-auth0 version

4.0

Next.js version

15.1.6

Node.js version

20.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions