User Profile Structure
Verify Users Script Templates
The Verify script implements the function executed to mark the verification status of a user’s email address in the legacy identity store. Email verification status information is typically returned via
email_verified as part of any user profile information returned (see Login and Get User for further details). The script is executed when a user clicks on the link in the verification email sent by Auth0. We recommend naming this function
verify. The script is only used in a legacy authentication scenario, and must be implemented if support is required for Auth0 email verification functionality.
While it’s not mandatory to implement the
verify function, it is a recommended best practice. The function is required to support user email address verification, and a verified email address for a user is critical to a number of the workflow scenarios in Auth0. Implementing the script will provide support for these workflows out-of-box.
verify function should be defined as follows:
|The email address for the user as the user identifying credential.|
||Executed with up to two parameters. The first parameter is an indication of status: a
User profile attributes
If the first parameter is
null then the second parameter should be a JSON object in a format similar to the following:
When indicating an error condition we recommend using the
Error object to provide Auth0 with a clear indication of the error condition. For example,
callback(new Error(“an error message”)).
View user profile
Language-specific script examples
Auth0 provides sample scripts for use with the following languages/technologies:
- ASP.NET Membership Provider (MVC3 - Universal Providers)
- ASP.NET Membership Provider (MVC4 - Simple Membership)
- SQL Server
- Windows Azure SQL Database
- Request with Basic Auth