Skip to content

MediumConceptAuthentication and sessions end to end

What cookie attributes do you set for a session cookie?

What a good answer covers

HttpOnly so scripts cannot read it, Secure so it only travels over HTTPS, SameSite=Lax or Strict against CSRF, a limited Path and Domain, and a sensible expiry.

More on Authentication and sessions end to end

Flashcards for this topic