Sync Auth0 user_metadata to Wordpress user


I have a Wordpress installation with the Auth0 plugin to manage user logins. We are using another application that creates & stores in Auth0 a user’s First & Last name using user_metadata. I am looking for a way to then pass these names from Auth0 and store the fields in the user’s Wordpress profile.

I came across a similar topic here: Signup via api: setting user metadata first name and last name which is very similar to what I am looking to accomplish. I am now trying to create a login action that sends these fields back to Wordpress, but am not sure about the logic required to call the Wordpress API and store the fields.

Any help would be greatly appreciated.

Thank you