Next/React SPA: Unknown or invalid refresh token

Hi,

I am using "@auth0/auth0-react": "^2.2.4", in my Next.js/React web app. I have set the Auth0 application as a Single Page Application, and here are my refresh token settings.

I’ve been getting errors suddenly that contain this error message:
"error": "invalid_grant", "error_description": "Unknown or invalid refresh token."

And am able to repro this by being logged into an account on Firefox, and then being logged into the same account on Chrome. Seems like the two browsers are trying to access the same token and that’s what’s causing the invalid message? Any help is appreciated. Thanks.

2 Likes

Hi, did you manage the solution?

It seams like we are having a similar problem: Problem with refreshing the token. · Issue #1739 · auth0/nextjs-auth0 · GitHub

Hi @Stas
No, not yet, just added more error logging around our authentication code to see if we can gather more info.