0

Based on the information given at https://fusionauth.io/docs/v1/tech/apis/users#update-a-user it seems that any API key that allows access to this endpoint can update any user record.

I am missing a method of authorization based on a JWT for this endpoint so that any user can update his/her user record.

What is the recommended practice to handle this?

Tom
  • 1,965
  • 3
  • 25
  • 33

1 Answers1

1

FusionAuth does not currently allow you to call the Update User API with a JWT issued to the user you're trying to update.

There are a couple of reasons for this. the first is that not all implementations would agree this is a safe operation for an end user to perform. The second is that because the custom data on the user and registration objects will be indexed by Elasticsearch. Elasticsearch creates a dynamic schema based upon these values which means it will expect the schema not to change.

For these reasons, and perhaps others, it is much safer to allow an API written by the FusionAuth implementor to handle this process.

That is all to say, you will want to call the Update User API on your end so you can control what is updated and perform any necessary validation on custom data.

robotdan
  • 1,022
  • 1
  • 9
  • 17