I found this article Signup Fields on the Universal Login Page which explain how to add custom signup fields. However I’d like to know if it’s possible to send those fields in a signup request object in the authentication API. My goal is to read those custom fields from an action in the pre-user-registration flow (example below).
exports.onExecutePreUserRegistration = async (event, api) => {
let firstName = event.request.body['custom-field-first-name'].trim();
let lastName = event.request.body['custom-field-last-name'].trim();
.....
};