Next.js Discord

Discord Forum

NextJS 14 cached cookies problem

Unanswered
Devon Rex posted this in #help-forum
Open in Discord
Devon RexOP
Hi there,

Upon authentication using route handlers, I save a bearer token as a cookie. Then, on the frontend, I trigger a call to router.refresh(). I notice that the HTTP-only cookie is stored. However, when the user re-authenticates, the cookie is set again, but it remains the same as before. Despite receiving a new bearer token from the authentication request, the cookie doesn't get updated.

0 Replies