Event.transaction returns null object

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.

Hi @emurphy,

I have tested your action script on my end and was able to get the locale in the event.transaction object.

I recommend using the Real-time Webtask Logs Extension to check your logs during the sign-up flow.

Let me know how it goes for you.

Thanks,
Rueben