Auth0 Home Blog Docs

Disable verification email for specific app



Hi everyone,

I would like to disable the verification email for one of my applications.
I decide to do it in pre-registration hook.
My code is here:

module.exports = function (user, context, cb) {
  var response = {};
  response.user = user;
  if ( === 'XXXXXXXXXXXXXX') // matching with my app client_id
    // don't send verification email
    response.user.emailVerified = true;

  cb(null, response);

What’s wrong with my code? What is the best way to do it?