How can I update(user profile) family_name and given_name for Regular Web Applications

Hi @criz.c

Welcome to the Auth0 Community!

In order to update or add data for the user, there is no need to create a ManagementClient. You can add these values inside user metadata in the ContinuePostLoginAction to be easily accessible:

  api.user.setUserMetadata('company_name', event.prompt.fields.company_name);

You can read more about this in our documentation.

You can also update that information directly during the login process:

event.user.family_name = event.prompt.fields.family_name;
event.user.given_name = event.prompt.fields.given_name;

Alternatively, you can do this inside the form directly, by creating a flow which contains similar code:

This would be the form:

This is the output inside the user raw JSON after a login:

"given_name": "Daniel",
 "family_name": "Smith",

Hope this helps! If you have any other questions, feel free to leave a reply!

Kind Regards,
Nik