[PR #3868] [MERGED] fix(custom-session): also mutate multi-session response #30657

Closed
opened 2026-04-17 21:41:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/3868
Author: @ping-maxwell
Created: 8/7/2025
Status: Merged
Merged: 8/28/2025
Merged by: @himself65

Base: canaryHead: fix/custom-session/multi-session


📝 Commits (10+)

  • 97fbb25 fix(custom-session): also mutate multi-session response
  • 65bfc2a add: docs + tests
  • a7f4ead chore: lint
  • abced1f Merge branch 'canary' into fix/custom-session/multi-session
  • a3f709e chore: lint
  • bccb529 update: make it opt-in
  • 4c5e4ef improve docs
  • 406de6b chore: cleanup
  • 14537d1 Merge branch 'canary' into fix/custom-session/multi-session
  • 8a2e8cf Merge branch 'canary' into fix/custom-session/multi-session

📊 Changes

3 files changed (+108 additions, -19 deletions)

View changed files

📝 docs/content/docs/concepts/session-management.mdx (+23 -1)
📝 packages/better-auth/src/plugins/custom-session/custom-session.test.ts (+53 -17)
📝 packages/better-auth/src/plugins/custom-session/index.ts (+32 -1)

📄 Description

closes https://github.com/better-auth/better-auth/issues/3855

  • tests
  • docs

Summary by cubic

Added support for mutating the multi-session response in the custom session plugin to handle device session lists.

  • Bug Fixes
  • Ensures custom mutation logic is applied to each device session in the multi-session endpoint.

🔄 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/3868 **Author:** [@ping-maxwell](https://github.com/ping-maxwell) **Created:** 8/7/2025 **Status:** ✅ Merged **Merged:** 8/28/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix/custom-session/multi-session` --- ### 📝 Commits (10+) - [`97fbb25`](https://github.com/better-auth/better-auth/commit/97fbb255e55f1647772238e7ae46f6a8f8954d15) fix(custom-session): also mutate multi-session response - [`65bfc2a`](https://github.com/better-auth/better-auth/commit/65bfc2a61cd5f8b9b010bfe8e7b0097fab542ddd) add: docs + tests - [`a7f4ead`](https://github.com/better-auth/better-auth/commit/a7f4ead2055d19a5884d313a1e96cfbd650d9900) chore: lint - [`abced1f`](https://github.com/better-auth/better-auth/commit/abced1f36e3c3eb5adfae933660abeb30258e9a9) Merge branch 'canary' into fix/custom-session/multi-session - [`a3f709e`](https://github.com/better-auth/better-auth/commit/a3f709ef719549a5887a0608121a0e6b9c29e311) chore: lint - [`bccb529`](https://github.com/better-auth/better-auth/commit/bccb529fb21f524f1ce7c2e788ceedf970d2c47c) update: make it opt-in - [`4c5e4ef`](https://github.com/better-auth/better-auth/commit/4c5e4ef58327148b93c35903f0e152024b13eff2) improve docs - [`406de6b`](https://github.com/better-auth/better-auth/commit/406de6b54ab6adf67381ddf39d812c994af516fa) chore: cleanup - [`14537d1`](https://github.com/better-auth/better-auth/commit/14537d18f0a401b05d0f197d0fea8767483d97c6) Merge branch 'canary' into fix/custom-session/multi-session - [`8a2e8cf`](https://github.com/better-auth/better-auth/commit/8a2e8cf71bcafe7e6a3ab3228922af843774dc56) Merge branch 'canary' into fix/custom-session/multi-session ### 📊 Changes **3 files changed** (+108 additions, -19 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/concepts/session-management.mdx` (+23 -1) 📝 `packages/better-auth/src/plugins/custom-session/custom-session.test.ts` (+53 -17) 📝 `packages/better-auth/src/plugins/custom-session/index.ts` (+32 -1) </details> ### 📄 Description closes https://github.com/better-auth/better-auth/issues/3855 - [x] tests - [x] docs <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Added support for mutating the multi-session response in the custom session plugin to handle device session lists. - **Bug Fixes** - Ensures custom mutation logic is applied to each device session in the multi-session endpoint. <!-- 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-04-17 21:41:46 -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#30657