I am using the
@auth0/auth0-react SDK (which has been very nice and easy to use), but I am running into an instance that I’m not sure the best course of action for. I have a ReactJS front end and NodeJS back end, and I am trying to create a UI for the user to edit their info (for example name or picture). The frontend sends the new information to the backend, and the backend uses the management api to change these root attributes which works as expected. The problem I am having is updating the info on the frontend. I saw a comment that the user object can’t be refreshed, but you can edit it directly with the same changes that were made to the db. This works for me until the page is refreshed, and (I am assuming) the id token gets decoded again and the user object doesn’t contain the changes anymore. Am I doing something fundamentally wrong, or is there a way to refresh the tokens on the frontend so they contain the new information?
The solution may just be to use the
Auth.js SDK instead and manage it in storage myself.
Thank you in advance!