[PR #1172] [MERGED] feat: secondaryStorage and storeSessionInDatabase behavior #3667

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/1172
Author: @wh5938316
Created: 1/10/2025
Status: Merged
Merged: 1/13/2025
Merged by: @Bekacru

Base: mainHead: feat/secondary-storage-behavior


📝 Commits (1)

  • 345052a feat: secondaryStorage and storeSessionInDatabase behavior

📊 Changes

2 files changed (+41 additions, -66 deletions)

View changed files

📝 packages/better-auth/src/db/internal-adapter.ts (+31 -66)
📝 packages/better-auth/src/types/options.ts (+10 -0)

📄 Description

  • Corrected secondaryStorage and storeSessionInDatabase behavior to align with expected functionality.
  • Added preserveSessionInDatabase option to retain database session records when deleting sessions from secondaryStorage.
  • Ensures backward compatibility with previous behavior.

close #1171


🔄 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/1172 **Author:** [@wh5938316](https://github.com/wh5938316) **Created:** 1/10/2025 **Status:** ✅ Merged **Merged:** 1/13/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/secondary-storage-behavior` --- ### 📝 Commits (1) - [`345052a`](https://github.com/better-auth/better-auth/commit/345052a2677782be914727e91ae89e9b7d75f160) feat: secondaryStorage and storeSessionInDatabase behavior ### 📊 Changes **2 files changed** (+41 additions, -66 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/db/internal-adapter.ts` (+31 -66) 📝 `packages/better-auth/src/types/options.ts` (+10 -0) </details> ### 📄 Description - Corrected secondaryStorage and storeSessionInDatabase behavior to align with expected functionality. - Added preserveSessionInDatabase option to retain database session records when deleting sessions from secondaryStorage. - Ensures backward compatibility with previous behavior. close #1171 --- <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 11:03:58 -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#3667