`clearAuthCookiesAtScopes` sends no cache headers, unlike `applyServerStorage`
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
Read src/cookies.ts and compare the setAll call in applyServerStorage (which passes the no-store headers) with the setAll(toSet, {}) call in clearAuthCookiesAtScopes. Pull the three headers into one shared constant and pass it from both call sites. Check the existing cookie tests in the repo to see how setAll options are asserted, and add a case covering the cleared-scope path so it verifies the same headers are sent; done means both paths use the one constant and a test fails if they diverge.
Written by the indexing model from the issue text.
Description
applyServerStorage passes these headers to setAll whenever it writes auth cookies (src/cookies.ts):
Cache-Control: private, no-cache, no-store, must-revalidate, max-age=0
Expires: 0
Pragma: no-cache
clearAuthCookiesAtScopes calls setAll(toSet, {}) instead, so a response that clears the session at old scopes carries no cache headers. A shared cache (CDN, a framework's full-route cache) can then store a Set-Cookie: ...; Max-Age=0 response and replay it to other users, which signs them out, or store the page that went with it.
Fix
Pass the same no-store headers from clearAuthCookiesAtScopes, ideally through one shared constant so the two paths can't drift again.
We currently add the headers ourselves around every clear.
- Dominant language
- TypeScript
- Stars
- 216
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from supabase/ssr
-
cookies.setAll loses its receiver for stateful cookie adaptersPossibly taken @PhuocOng claimed this 71 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 3/5 Half a day Newbie friendliness 56/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Stale host-only auth cookies survive a Domain migration and shadow the new sessionPossibly taken @RaphaelFakhri claimed this 30 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 25/100
Similar issues
-
[Bug]: OpenCode v2 skips an assistant message that gains text after an earlier capturePossibly taken @jianyx1 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
volcengine/OpenViking#8354 ·
Maintainers usually reply within 1 day
-
frontend: Job: Details do not show completed or failed indexes or the per-index backoff limitsPossibly taken @arshil42 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
kubernetes-sigs/headlamp#8630 ·
Maintainers usually reply within 1 day
-
bug from-app needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
nightly-labs/openbot#15640 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
-
comp/desktop desktop/settings P2 tool/skills type/perf
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
NousResearch/hermes-agent#159515 ·
Maintainers usually reply within 1 day