Thank you for bringing this to our attention! While the change_username and change_phone_number scripts are not mentioned in our documentations, let me try and provide some information :
change_username : it should function the same way as the change_email script, as it ends with return(null, true) when successful. The script must also be added in the list of action scripts via the Management API :
change_phone_number : this script needs to be implemented in order to update the phone number in the external DB through the Management API, as the Auth0 Dashboard does not support it:
{
"options": {
"customScripts": {
"change_phone_number": "function changePhoneNumber(oldPhoneNumber, newPhoneNumber, verified, callback) { console.log(\"Update phone number called....\"); console.log (\"oldPhoneNumber:\", oldPhoneNumber); console.log (\"newPhoneNumber:\", newPhoneNumber); console.log (\"verified:\", verified); console.log (\"callback:\", callback); callback(null, true); \n}\n",
// other scripts are removed for brevity
},
// other attributes are removed for brevity
}
}