[PR #8275] [MERGED] test(cookies): add Playwright e2e test for sign-out cookie clearing #24766

Closed
opened 2026-04-15 22:33:01 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8275
Author: @himself65
Created: 3/2/2026
Status: Merged
Merged: 3/2/2026
Merged by: @himself65

Base: canaryHead: fix/sign-out-cookie-cache-clearing


📝 Commits (1)

  • 459a39e test(cookies): add Playwright e2e test for sign-out cookie clearing

📊 Changes

3 files changed (+74 additions, -2 deletions)

View changed files

📝 e2e/integration/vanilla-node/e2e/app.ts (+3 -0)
e2e/integration/vanilla-node/e2e/cookie-cache-signout.spec.ts (+68 -0)
📝 e2e/integration/vanilla-node/e2e/utils.ts (+3 -2)

📄 Description

Summary

  • Added Playwright e2e test that verifies a real Chromium browser clears both session_token and session_data cookies on sign-out when cookieCache is enabled
  • Minor refactor to createAuthServer and setup in vanilla-node e2e utils to accept config overrides

Finding: The server-side sign-out code already correctly sets Max-Age=0 on both cookies, and the Playwright e2e confirms real browsers respect this. The issue reported in #8273 is likely a client-side or framework integration problem (e.g. Set-Cookie headers not being forwarded).

Related: #8273

Test plan

  • Playwright e2e e2e/integration/vanilla-node/e2e/cookie-cache-signout.spec.ts — real Chromium confirms both cookies are cleared
  • Existing vanilla-node e2e tests still pass
  • pnpm lint, pnpm format:check, pnpm typecheck all pass

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8275 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/2/2026 **Status:** ✅ Merged **Merged:** 3/2/2026 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/sign-out-cookie-cache-clearing` --- ### 📝 Commits (1) - [`459a39e`](https://github.com/better-auth/better-auth/commit/459a39e28195aee429b7bcd284eef2f9556dd83f) test(cookies): add Playwright e2e test for sign-out cookie clearing ### 📊 Changes **3 files changed** (+74 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `e2e/integration/vanilla-node/e2e/app.ts` (+3 -0) ➕ `e2e/integration/vanilla-node/e2e/cookie-cache-signout.spec.ts` (+68 -0) 📝 `e2e/integration/vanilla-node/e2e/utils.ts` (+3 -2) </details> ### 📄 Description ## Summary - Added Playwright e2e test that verifies a **real Chromium browser** clears both `session_token` and `session_data` cookies on sign-out when `cookieCache` is enabled - Minor refactor to `createAuthServer` and `setup` in vanilla-node e2e utils to accept config overrides **Finding:** The server-side sign-out code already correctly sets `Max-Age=0` on both cookies, and the Playwright e2e confirms real browsers respect this. The issue reported in #8273 is likely a client-side or framework integration problem (e.g. `Set-Cookie` headers not being forwarded). Related: #8273 ## Test plan - [x] Playwright e2e `e2e/integration/vanilla-node/e2e/cookie-cache-signout.spec.ts` — real Chromium confirms both cookies are cleared - [x] Existing vanilla-node e2e tests still pass - [x] `pnpm lint`, `pnpm format:check`, `pnpm typecheck` all pass --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-15 22:33:01 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#24766