NextJS GetAccessToken() Always Returns Error "The access token expired and a refresh token is not available"
Sep 10, 2025
Overview
The access token expired and a refresh token is not available. The user will need to sign in again.
This occurs despite the user having just authenticated and holding a valid access token.
Applies To
- Auth0 NextJS SDK
- API calls
Cause
This means that 60 seconds are removed from the expiry time when validating, which results in the token being always expired if the lifetime is never greater. Please see this link for more details.
Solution