Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Rule to force email verification only for some applications on the Auth0 dashboard
function (user, context, callback) {
// Bypass this rule for a particular app
if(context.clientName === 'NameOfTheAppToBypass'){
return callback(null, user, context);
}
// Access should only be granted to verified users otherwise.
if (!user.email || !user.email_verified) {
return callback(new UnauthorizedError('Access denied.'));
}
callback(null, user, context);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.