Auth0-PHP - Update User Info After Profile Change

Hey again! :wave: Just wanted to confirm this will work without firing off any sort of reauthentication. I took some time and prototyped it today.

  • Issue the user changes using Auth0\SDK\API\Management\Users::update()
  • Pull the newly updated user data from the Auth0\SDK\API\Authentication::userinfo()
  • Overwrite the local user data for the user session using Auth0\SDK\Auth0::setUser()

I’m uncertain why our API documents say otherwise on this, there might be some use cases where that is required for the values to update. However, as far as my actual testing with the API goes, this will work fine without reauthenticating.

1 Like