Conditionally apply custom email validation in Lock

Hi @acrlq,

Thanks for reaching out to the Auth0 Community!

Firstly, I do not recommend using the config.extraParams as a method to conditionally apply restrictions to sign up since a user can simply bypass the restriction by omitting that query parameter. Moreover, there is no way to prevent sign-up in the HTML code.

In this case, I recommend using a Pre-User Registration action to prevent users from signing up if they do not meet your requirements for email validation.

I recommend checking out our Users are registering with email domains that we don't want to allow FAQ as well.

Please let me know how this works for you.

Thanks,
Rueben

1 Like