🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Security and JWT: all 10 questions

Quiz: Security and JWT · Question 8 of 10

Why does a failed login return 401 without saying whether the email exists?

Why does a failed login return 401 without saying whether the email exists?

  1. A.Saying "email not found" would help attackers find valid accounts
  2. B.The server does not know whether the email exists
  3. C.HTTP does not allow error messages
  4. D.401 responses cannot have a body
Answer & explanation

Correct answer: Saying "email not found" would help attackers find valid accounts

Give the same answer for a wrong email and a wrong password.

Can you get the rest right without peeking?

Take the timed Quiz: Security and JWT quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →