-
Notifications
You must be signed in to change notification settings - Fork 410
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v4: Infinitely stacking cookies #1917
Comments
Thank you for reporting this, we are actively looking into this. We will post an update here once we have found a resolution. |
We had some user reports of this in production. Sharing this hacky fix until there is a patch available. This is a snippet from our middleware function:
On |
THX @jdwitten . We faced a same problem while handling 401 in middleware. This workaround saved us 🍺 |
Trying to migrate von v3 to v4 and immediately encountered this problem. Only had problems with the migration and now the app is breaking for users because of this. I wished this would be treated with a higher priority. |
Checklist
Description
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
/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
The text was updated successfully, but these errors were encountered: