Skip to content

NextAuth JWT Refresh Token Not Updating — Backend Returns "Invalid Refresh Token" #4

@mitesh-avid-brio

Description

@mitesh-avid-brio

I’m using NextAuth.js with JWT sessions and refresh tokens. When the access token expires, the refresh logic calls my backend API to get new tokens. Although the backend returns a new access token and refresh token, my app continues sending the old refresh token in subsequent requests. This causes the backend to respond with a 401 “Invalid Refresh Token” error, and the token refresh fails repeatedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions