Skip to content

fix(cookies): send cache headers when clearing old auth cookies - #320

Open
shoemoney wants to merge 1 commit into
supabase:mainfrom
shoemoney:fix/ssr-auth-cookie-cache-headers
Open

shoemoney wants to merge 1 commit into
supabase:mainfrom
shoemoney:fix/ssr-auth-cookie-cache-headers

Conversation

@shoemoney

Copy link
Copy Markdown

clearAuthCookiesAtScopes passes an empty headers object to setAll, even though it writes auth cookies. It should send the same cache-prevention headers as the normal auth storage path.

This shares the existing headers through an internal helper and uses them when clearing cookies at old scopes. Each call gets a fresh object.

Fixes #316.

The new regression fails on the original code. All 121 tests pass with the fix, along with the TypeScript build, Prettier and ESLint on Node 22.22.3.

@shoemoney
shoemoney requested review from a team as code owners November 28, 2026 04:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clearAuthCookiesAtScopes sends no cache headers, unlike applyServerStorage

1 participant