pre-user-registration trigger to add end-user supplied data (like a user’s phone number or location) from the signup prompt to user_metadata. Optionally, you can validate this data and show a validation error in the prompt.
Prerequisites
- Tenant has a Custom Domain verified
- Tenant has a Page Template set
Add A Field To The Signup Prompt
Use the Management API to insert a custom field into a prompt using one of the Entry Points. This example adds the following content to theulp-container-form-content-start insertion point:
Create An Action In The Pre-User Registration Trigger
You can build a custom pre-user registration action by going to Actions > Library > Build Custom.onExecutePreUserRegistration handler:
api.validation.error method, then deploy the action: