SpinTheMic
Pro

Interview practice question

Session cookie missing security flags

Backend Engineering · Auth and Security · Beginner

A security review notes that your session cookie lacks the Secure, HttpOnly and SameSite flags. What does each flag protect against?

What a strong answer covers

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

  • Secure: only sent over HTTPS.
  • HttpOnly: JavaScript can't read it (XSS theft).
  • SameSite: limits cross-site sending (CSRF).
  • Set Lax or Strict.
  • Also set sensible expiry and path.
Practise this topic

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

See all topics