Invalid login credentials produce <UNKNOWN_ERROR>


We’ve been successfully using a custom DB connection for a few years now, and recently (past couple weeks) we noticed that invalid login credentials results in an <UNKNOWN_ERROR> being generated by auth0. This was strange, since we had not updated that function in that timeframe.

We’re following the instructions in this documentation: Troubleshoot Custom Databases

Here is what our login function returns in auth0:

var auth0Error = new WrongUsernameOrPasswordError(email);

Which produces:


Auth0 then turns this into an <UNKNOWN_ERROR>.

Can we get some help with this?


We are having the same issue after using Auth0 for a number of years now, I have logged a ticket with Auth0 as we have not changed anything.

1 Like

Having the same issue. Looks like the implementation of WrongUsernamePasswordError may be more strict than before.

Only passing in an error message worked fine before but started resulting in <UNKNOWN ERROR> over the weekend.

By adding the username/email as the first parameter, followed by an error message, we got the expected behavior as before.

Old implementation, results in <UNKNOWN ERROR>:

new WrongUsernameOrPasswordError("Could not verify credentials")

New Implementation working as expected:

new WrongUsernameOrPasswordError(username, "Could not verify credentials")
1 Like

I am having the same issue.
Trying to display an error message edited in Universal Login when a user enters an invalid password. For example, " Wrong email or password ".

This is my login function :
callback(new WrongUsernameOrPasswordError(email, null));

Before, there is wrong-email-credential prompt. But now <UNKNOWN_ERROR>

Sorry for my poor English.
I’d be glad to know how to resolve this.

As adding message solves the problem, it is not valid solution for multilanguage environment, as there is no way to get any language information in script:
a) no request accepted language
b) no client info, so no supported languages
c) as user not found, so no user language

I had to face this issue too. I don’t get why they did this change without any notice. Basically broke many client’s products and let us figure out what to do. That’s not fair at all.

1 Like

Just replying to confirm that @andrew.mendez’s solution worked for us as well. Thank you!

It would be nice to fix this with multi-language support. As hardcoding a message in the script isn’t really a fix all solution.

We are having this issue with internationalization as well