- What is the error message for wrong credentials?
- Which error message is better when users entered a wrong password?
- Why does it say my password is wrong when its right?
What is the error message for wrong credentials?
If you've just logged on and received the 401 error, it means that the credentials you entered were invalid. Invalid credentials could mean that you don't have an account with the website, your username was entered incorrectly, or your password was incorrect.
Which error message is better when users entered a wrong password?
In some contexts you don't want an attacker to be able to guess the existence of an account. So you'll always return the generic error message so that an attacker cannot guess if this account exists or not.
Why does it say my password is wrong when its right?
Why does it say my password is wrong when it's right? Because you're wrong. If you've typed in your username correctly and are typing in what you think is your password correctly, and it's still telling you wrong username or password, then one or both of those two items are no longer correct.