Customization of error codes for login flow

Hi,
the use case I need to implement requires the way to distinguish between login with a correct email and wrong password and login with both credentials wrong (email/password). I need to provide different error messages for login flows. As far as I know, currently, Auth0 returns single error code for both cases invalid_user_password which can be customized for example when using Auth0 Lock widget.

Is it possible to differentiate the cases I mentioned to have better customization of error messages?
The login action happens on the Universal Login page.

Hey @pastdevr, Welcome to the Auth0 Community.

Yes, we only support customization of invalid_user_password, which covers both scenarios:

To distinguish between login with a correct email and wrong password and login with both credentials wrong (email/password) poses risks of revealing the existing email in the database in my opinion. Hence the generic error.

Regards,
Sid

2 Likes