The access token expired and a refresh token is not available. The user will need to sign in again. What now?

Hi @amg1,
I can’t help with the specific next.js issue, but I suggest you ensure refresh token support is enabled before using the offline_access scope.

Please, go to your NestJS API in the Auth0 dashboard and enable refresh token support through the Allow Offline Access toggle button

Save the API settings.

Now, in your app, you can use the offline_access scope to get a refresh token along with the ID and access token.

References:

I also suggest enabling refresh token rotation to improve security (Auth0 dashboard → your App → Refresh Token Rotation section).
Check out this article to learn more about refresh tokens.

I hope this may help.