End Users Ability to update Profile

What is the best, easiest way, to implement the ability for the end user to update their profile within the client, through React? I followed Auth0 React: Login and React: Call an API and have my app up and running with users being able to sign up and login just fine. However, if the user clicks their Profile link from the drop-down, it takes them to their profile page with the basic info and then the raw JSON. This is the default function based on the quickstart. How do allow this page to have the ability for input fields or text boxes or whatever, so the user can update fields themselves? I can’t seem to find a good example of such, so I apologize if there is one out there and I am missing it. Any guidance would be fantastic! Thank you.

Hi @strasserra04,

Welcome to the Community!

You can update a user’s information with the management API patch users by id endpoint. You won’t be able to do this from your SPA, because this action requires a management API token, which are not issued to public clients like your react app. This is because they can easily be inspected and used maliciously.

Instead, you should make these kinds of changes from your backend or API. It will ct as a proxy for the request. See this FAQ about how to change a user’s email (although email is a bit more sensitive because it is part of the user’s credential, where a address or nickname might not have as much effect, but you get the point).

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.