How to fetch new token after updating user_metadata in React

This is the same issue I reported here: Silent Auth errors with Login Required after updating app_metadata via Management API - #3 by spatail

After my backend updates the app_metadata via the Management API, the UI gets the Login Required error when calling getAccessTokenSilently({ ignoreCache: true });. If I instead update the metadata directly via the Auth0 UI, my UI is able to refresh the token successfully.

It seems that updating the metadata via the Management API changes the session in Auth0 perhaps invalidating the current refresh token? I am quite lost at this point.

Any help would be much appreciated.

1 Like