Suppress sending verification E-Mail via UI

Hello everyone,

I have read several similar threads regarding this topic, but I can’t find the solution to my issue.

What I want:

  • create user via UI
  • disable automatic sending of verification emails (since I want to add some required metadata)
  • after user is created, I add some metadata
  • click in UI on verify email, so that the user gets the verification email

I am kind of lost here, since this process works if I create the user via API call i.e.

--data-raw '{"email":"email@address.com","blocked":true,"email_verified":false,"family_name":"Familiy_Name","password":"supersecret","connection":"Username-Password-Authentication","verify_email":false}'

I can see the requested App Metadata block

When I click on “Actions - Send Verification Email”, I get the desired email to verify myself.

I have also defined a pre-user and post-user-registration action like this:

exports.onExecutePreUserRegistration = async (event, api) => {
  // Set email_verified to false
  api.user.setAppMetadata('email_verified', false);
  api.user.setAppMetadata('verify_email', false);
  api.user.setAppMetadata('blocked', true);

  // Add a flag to track unverified status
  api.user.setAppMetadata('verification_status', {
    verified: false,
    created_at: new Date().toISOString()
  });
  
  // Prevent verification email from being sent
  api.user.setAppMetadata('suppress_verification_email', true);
};

and

exports.onExecutePostUserRegistration = async (event, api) => {
  // Set email_verified to false
  api.user.setAppMetadata('email_verified', false);
  api.user.setAppMetadata('verify_email', false);
  api.user.setAppMetadata('blocked', true);

  // Add a flag to track unverified status
  api.user.setAppMetadata('verification_status', {
    verified: false,
    created_at: new Date().toISOString()
  });
  
  // Prevent verification email from being sent
  api.user.setAppMetadata('suppress_verification_email', true);
};

I can see that the App Metadata ist actually filled out like expected, but the behaviour is just wrong. The user is unlocked, the verification email is send.

Any ideas/suggestions on that topic?

Cheers

Hi @mrszop

Welcome to the Auth0 Community!

Unfortunately, It’s not possible to disable the automatic sending of verification emails via Auth0 Dashboard, and it’s possible, as you identified, when creating a user with Management API. You can read about that here → Disable Verification Email Sent on User Creation

If you think this feature would benefit Auth0, I encourage you to open a new thread in the Feedback category, explaining your use case and what you would like this feature to look like.

Thanks
Dawid

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.