Auth0 Require Email Verification - Breaks Registration

Hello all,

I wanted to implement requiring email verification for users. I’ve read the documentation and created a post-login action that has the following code:

exports.onExecutePostLogin = async (event, api) => {
  if (!event.user.email_verified) {
    api.access.deny('Please verify your email before logging in.');

The problem is that nowhere does the user see the message when they try to login (as the demos show) without verifying email.

Using React front-end with .net core back.

Thank you!

Hi @scott14,

Welcome to the Auth0 Community!

The error message will appear in the URL of the browser window.

If you need to present a clear error message, please consider redirecting your users to a custom hosted error page.

Please let me know if you have any questions.


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.