TIGHTENING THE COOKIE FLAGS — SAMESITE=STRICT BROKE EMBEDS
Quick post-mortem on a self-inflicted wound.
On the 21st I flipped the session cookie from samesite=Lax to samesite=Strict across the board. CSRF surface reduced, fewer session-riding vectors, should be a pure win.
Broke every embed of the leaderboard on the OSH arcade site within an hour. The iframe load happens without a top-level navigation, so the cookie is not sent, the user is treated as a guest, and the personal best column goes blank.
Reverted to Lax on the 22nd. Embeds came back. The CSRF tradeoff is real but acceptable as long as the CSRF token is checked on every state-changing POST.
Lesson: samesite=Strict is correct for an isolated app. If you serve embeds, samesite=Lax plus a real CSRF token is the answer. Do not skip the token.