Why error login and password server return status 200 ok

Viewed 1398

All major web applications (Google, Facebook, etc.) return page status 200 ok in case of authentication failure, i.e. wrong login/password pair.

Although by definition, if a resource is not found with request URI - status 404 Not found is returned.

Wikipedia says:

[404 Not Found] Used when the requested resource is not found, whether it doesn't exist or if there was a 401 or 403 that, for security reasons, the service wants to mask

How does the login case differ?

1 Answers

Server code 200 means you get the response . Whether it is your wrong credentials or not. if Your request has not been processed then server returns different error code . But for your case,

Your login request has been processed , connection with database has been established and from that you get you wrong credential message . So code 200 is for your successfully processed request.

Related