Management.sendEmailVerification is Not a Function

Overview

This article explains why some users fail to log in via a flow with the following error:
"type": "f",
"description": "management.sendEmailVerification is not a function",

Solution

"management.sendEmailVerification" has been deprecated from the Node SDK.

  • The Node package version the action is running is "auth0@4.1.0", which is documented in the Auth0 GitHub public library.
  • The "sendEmailVerification" does not exist anymore in this version. However, it does exist in the previous version "3.7.1".

There are two possible workarounds to this error: 

  1. Use in the action the Auth0 node version 3.7.1 that includes the sendEmailVerification. Add the dependency to this previous version like below: 
Add Dependency
  • Add version 3.7.1 to the dependency in Auth0. This will force the ManagementClient to use the previous version: 
  • const ManagementClient = require('auth0').ManagementClient;
  1. Adapt app code to the new 4.1.0 node (or latest) version. The "sendEmailVerification" was migrated to "job.verifyEmail", see v4_MIGRATION_GUIDE.md for more information

Recommended content

No recommended content found...