[PR #6624] [MERGED] chore: cleanup account cookie and state on signout #6788

Closed
opened 2026-03-13 13:11:44 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/6624
Author: @Bekacru
Created: 12/9/2025
Status: Merged
Merged: 12/9/2025
Merged by: @Bekacru

Base: canaryHead: fix/sign-out


📝 Commits (4)

  • 0d4f3d4 chore: cleanup account cookie and state on signout
  • 25ed688 Update packages/better-auth/src/cookies/index.ts
  • 4afb8f6 cleanup chunk
  • 944341f cleanup base account data cookie

📊 Changes

2 files changed (+26 additions, -2 deletions)

View changed files

📝 packages/better-auth/src/cookies/index.ts (+25 -1)
📝 packages/better-auth/src/cookies/session-store.ts (+1 -1)

📄 Description

Summary by cubic

On sign out, remove session data, clear the OAuth state cookie (when enabled), and delete the account cookie (including chunked data, when configured). This ensures a clean logout with no stale account or OAuth state.

Written for commit 944341f684. Summary will update automatically on new commits.


🔄 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/6624 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 12/9/2025 **Status:** ✅ Merged **Merged:** 12/9/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/sign-out` --- ### 📝 Commits (4) - [`0d4f3d4`](https://github.com/better-auth/better-auth/commit/0d4f3d4f9a88348c929bf8fe4f3921ce2d6fc1b4) chore: cleanup account cookie and state on signout - [`25ed688`](https://github.com/better-auth/better-auth/commit/25ed68808530b3eb6363da053e2774de04fb1389) Update packages/better-auth/src/cookies/index.ts - [`4afb8f6`](https://github.com/better-auth/better-auth/commit/4afb8f601bfc13d924f070a172f75f606fb8f3d8) cleanup chunk - [`944341f`](https://github.com/better-auth/better-auth/commit/944341f684a7e5c92ac5b375b771ffceb73d03f3) cleanup base account data cookie ### 📊 Changes **2 files changed** (+26 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/cookies/index.ts` (+25 -1) 📝 `packages/better-auth/src/cookies/session-store.ts` (+1 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic On sign out, remove session data, clear the OAuth state cookie (when enabled), and delete the account cookie (including chunked data, when configured). This ensures a clean logout with no stale account or OAuth state. <sup>Written for commit 944341f684a7e5c92ac5b375b771ffceb73d03f3. Summary will update automatically on new commits.</sup> <!-- End of auto-generated description by cubic. --> --- <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-03-13 13:11:44 -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#6788