from Refresh Token Not Being Applied in Subsequent Fetch Requests (Server-Side) #70319
Unanswered
muzaf-dev
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Issue Description
Working on a Next.js project where the server-side fetch requests need to handle token refresh when the accessToken expires. My server responds with a new accessToken in an httpOnly and secure cookie after refreshing the token. However, I am encountering an issue where the subsequent fetch request after the token refresh still uses the old cookies and doesn't include the newly refreshed accessToken.
Flow:
(Seem next/headers cookie is not autoupdated)
Using "next": "14.2.5"
Beta Was this translation helpful? Give feedback.
All reactions