SameSite Cookie

Security

// Definition

The SameSite attribute on a Set-Cookie header controls whether the browser sends the cookie on cross-site requests. Three values: Strict (cookie sent only on same-site requests — most restrictive, breaks some OAuth redirect flows); Lax (cookie sent on same-site requests and top-level navigations — the browser default since 2020); None (cookie sent on all requests including cross-origin — requires the Secure flag or modern browsers silently drop it). Testing checklist: session and auth cookies should be Lax or Strict; cross-origin API clients that send cookies must use SameSite=None; None without Secure is a common misconfiguration that causes silent cookie rejection rather than an error response.

// Related terms