Pre-registration action not showing right error message

Hi

I am trying to validate my user_meta_data in pre-registrtion action and show an appropriate error message if the check fails and stop the signup flow.

exports.onExecutePreUserRegistration = async (event, api) => {
  if (event.user.user_metadata.orgId === '12') {
    api.access.deny('no_signups_from_north_america', "Invalid org Id");
  }

(the check is only for testing purpose).

In the logs I can see the response sending back my error message as
{"name":"InternalExtensibilityError","statusCode":400,"code":"extensibility_error","message":"no_signups_from_north_america","friendly_message":"Invalid orgId.","description":"no_signups_from_north_america","fromSandbox":true}

But on the signup page it displays “WE’RE SORRY, SOMETHING WENT WRONG WHEN ATTEMPTING TO SIGN UP.” and not the message I am sending.
Is there something I am missing here.

Hi @adale,

Welcome to the Auth0 Community!

It sounds like you may be using Classic Universal Login, which doesn’t support passing the error in the same manner as New Universal Login. Here is an example of what each would look like:

New Universal Login

Classic Universal Login

I have some customization on sign up , which is not supported by New Universal Login page , so went with classic login page. So is there a way where we can customize the login/signup page and provide custom error page.

Yes, please see this doc: