Different errors in production and dev modes

I found that we have different errors for the Accounts.createUser, Accounts.setUsername, Accounts.setPassword in development and production modes.

I’m trying to save an already existing username:

Dev mode:

With --production flag:

Was this done intentionally, or is it a bug?

Thanks!

Hi, this is intentional.

Here is the part of the code where we do this.

It’s like this to help avoid brute-force attacks, but you can disable it by using Accounts.config and setting ambiguousErrorMessages to false.

2 Likes