exports.onExecutePreUserRegistration = async (event, api) => {
// this isn't working, event.transaction is not set for some reason
if (event.transaction) {
api.user.setUserMetadata("preferredLanguage", event.transaction.locale)
console.log(event.transaction.locale)
}
};
Why is event.transaction not set? Using embedded login flow.