Show custom error message on login page

Hi all, I am using universal login without any customize page. I want to use action to stop user login if a variable inside their user meta data is false, I try to use api.access.deny(), but the error message is not showing in universal login page, it only shows on retruend URL with the error description. Is there a way to show the error message inside the universal login page? Are there anything like Pre-Login on actions ?

Hello @Adaptiv-ChuanyuZhang,

Welcome back to the Auth0 community!

It is possible to show custom error messages in Universal Login. To do that, go to Tenant Settings > Settings > Advanced (tab) > and disable the ā€œUse a generic response in public signup API error messageā€ toggle (under ā€œSettingsā€ section).

Be aware that this is toggled on by default for security reasons - anyone can try signing up with an email address. Using the ā€œgenericā€ error message would prevent any hackers from knowing which emails exists in your tenant.

After disabling that, you can create the custom messages. Please check the following documentation that shows you how to do that: Customize Lock Error Messages

I hope this was helpful!

Thanks,
Tudor

hi @tudor.smeu,
thanks for the help, but the documentation you provide is for classic login, is there anything for universal login error message? I only want to show this error message on login page, I do not use sign up at all.