SpinTheMic
Pro

Interview practice question

API returns too much data

Backend Engineering · Auth and Security · Intermediate

Your user API returns the full user object, including password hashes and internal flags, and the frontend just hides them. What is wrong?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Data exposure; anyone can read raw response.
  • Hiding in UI isn't security.
  • Use response DTOs/serialisers with allowlisted fields.
  • Different views per role.
  • Review responses in tests.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics