"Unknown or invalid refresh token" error encountered for NextJS projects

Hi @jarebb

Thanks for getting in touch with us at Auth0 Community.

It’s difficult to know what could be causing this without more information but I have some ideas below:

If you are not using refresh token rotation and manually revoking refresh tokens, it could be that you have this tenant setting switched on which would would invalidate all tokens associated with the same grant, please see https://auth0.com/docs/secure/tokens/refresh-tokens/revoke-refresh-tokens#refresh-tokens-and-grants, if so you could try switching the tenant setting off.

I’m linking some similar posts below which may also help you on this issue:

https://community.auth0.com/t/error-403-invalid-grant-unknown-or-invalid-refresh-token-spa-reactjs/89027

https://community.auth0.com/t/error-refreshing-access-token-invalid-grant-unknown-or-invalid-refresh-token/74127

Warm regards.

1 Like