Actions and pre-user-registration trigger

Hi @brett2 and @josiah_devizia,

Thank you both for the responses.

Yes, this would be a great workaround! For clarity, the login count will be 1 because Enterprise or Social users gets added to Auth0 regardless of clicking the “signing up” and “logging in” buttons. Meaning, that the user will always log in both sign-up and log-in flows.

exports.onExecutePostLogin = async (event, api) => {
  if (event.stats.logins_count === 1) {
    //Your logic here
  }
};

I hope this helps!

Please let me know if you have any additional questions.

Thank you.

1 Like