Get latest useAuth0().user after getAccessTokenSilently

Please include the following information in your post:

  • Which SDK this is regarding: @auth0/auth0-react
  • SDK Version: 1.6.0

Inside one of my component, I’m updating the accessToken by passing one of the props as the parameters like this:

      const accessToken = await getAccessTokenSilently({
        ignoreCache: true,

I also have a hook function in login flow of auth0 which will update the accessToken and idToken according to the params(accountId) I passed in. Like this:
api.idToken.setCustomClaim(${namespace}/accountId, accountId);
My expectation is:
after calling getAccessTokenSilently, I want to get the latest user from auth0 which has the /accountId.

Hi @scott.liu,

Are you talking about an Auth0 Action? It sounds like you are looking for the event.query object, which should contain any additional query params. I don’t think that value would be populated as accountId automatically.

Posting your entire Action could be helpful here.