PostHog / squeak

A Q&A widget for your docs
https://squeak.posthog.com/
MIT License
178 stars 15 forks source link

set sameSite, httpOnly and secure cookie options on logout #198

Closed ajsharp closed 2 years ago

ajsharp commented 2 years ago

This was causing issues with cross-site logout requests (e.g. when trying to logout from squeak-react). If you don't explicitly set the sameSite option to none, the browser defaults it to lax, and the browser will refuse to set those cookies on cross-site requests. So this essentially just sets the same cookie options that we do when we generate the login cookie so we don't hit these errors.

CleanShot 2022-08-18 at 10 17 52@2x