Course lesson
Add a custom field to the users metadata with the Pre User Registration trigger.
Add a custom field to the users metadata with the Pre User Registration trigger.
In the Actions editor enter the following code
exports.onExecutePreUserRegistration = async (event, api) => {
api.user.setUserMetadata("favorite_ninja_turtle","raphael" )
};This action uses the API object to add the new metadata before the user is saved to the database
To learn more about Auth0 user metadata read the docs here
Course lesson
Add a custom field to the users metadata with the Pre User Registration trigger.