Auth0 spa 2.x returning missing_refresh_token

Hi all! If the error is correct in that there is no refresh token available, I have hunch this may be related to the introduction of authorizationParams and a missing offline_access scope in particular. The Auth0Provider in v2 should look like the following (note scope value in authorizationParams):

ReactDOM.render(
  <Auth0Provider
    domain="YOUR_AUTH0_DOMAIN"
    clientId="YOUR_AUTH0_CLIENT_ID"
    authorizationParams={{
      redirect_uri: window.location.origin,
      audience: "YOUR_AUDIENCE_ID",
      scope: "openid profile email offline_access"
    }}
  >
    <App />
  </Auth0Provider>,
  document.getElementById('app')
);

Hope this helps!

3 Likes