Skip to content

Respect sameSite while deleting cookie #255

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mintuhouse
Copy link
Contributor

Fix for logout when using from inside an iframe

Fixes #243 (comment)
Redo of #232

@mintuhouse mintuhouse marked this pull request as ready for review May 25, 2025 14:53
@mintuhouse mintuhouse requested a review from a team as a code owner May 25, 2025 14:53
@mintuhouse mintuhouse requested a review from cmatheson May 25, 2025 14:53
@mintuhouse mintuhouse force-pushed the mintuhouse/fix-logout-iframe branch from 7dc26f2 to 4c62373 Compare May 25, 2025 17:55
@nicknisi nicknisi requested a review from Copilot May 27, 2025 14:26
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the logout behavior from inside an iframe by respecting the sameSite policy when deleting the cookie.

  • Adds an import for WORKOS_COOKIE_SAMESITE.
  • Sets sameSite (defaulting to 'lax') and computes the secure flag based on sameSite before deleting the cookie.

@mintuhouse
Copy link
Contributor Author

@nicknisi can you review this?
we need a release with fix for this to use the new org switching helper

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant