PreUserRegistration Action (using Passwordless) not setting user metadata

Hi @norberto,

Thank you for your response.

Yes, that is correct. However, to pile on to the solution, you could include a Force Email Verification Post-Login Action to disrupt the signup flow. This way, first-time users cannot continue access until they have verified their email address.

exports.onExecutePostLogin = async (event, api) => {
  if (!event.user.email_verified) {
    api.access.deny("Please verify your email before logging in.");
  }
};

Please let me know how this works for you.

Thank you.

1 Like