verify
.
This script is only used in legacy authentication scenarios, and is required to support user email address verification. A verified email address is critical to a number of workflow scenarios in Auth0, and implementing this script will provide support for these out of the box.
If it’s enabled, this script is executed when a user clicks on the link in the verification email sent by Auth0.
verify
function should:
email_verified
(or equivalent) attribute in the user’s profile in the external database.true
if the update action succeeded.verify
function accepts two parameters and returns a callback
function:
Parameter | Type | Description |
---|---|---|
email | String | User’s email address. |
callback | Function | Used to pass error or profile data through the pipeline. |
login
function. For language-specific examples, read Language-specific script examples.
callback
function is used to pass user profile data or error data through the pipeline.
callback
function accepts up to two parameters and returns a function:
Parameter | Type | Required | Description |
---|---|---|---|
error | Object | Required | Contains error data. |
verified | Boolean | Optional | Contains value that represents the user’s verification status in the external database (true or false ). Only required if the value is true . |
null
value for the error
parameter, and a true
value for the verified
parameter.
email_verified
attribute in the user’s Auth0 profile, regardless of what value is returned in the callback
function.To update the email_verified
attribute in the user’s Auth0 profile, you must include the email_verified
attribute and its value in the user profile object returned in the Login and Get User scripts.error
parameter should contain relevant information about what went wrong.