[PR #5056] [MERGED] fix: update session db hook should expect partial session type #22645

Closed
opened 2026-04-15 21:11:31 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5056
Author: @Bekacru
Created: 10/2/2025
Status: Merged
Merged: 10/2/2025
Merged by: @Bekacru

Base: canaryHead: fix/options


📝 Commits (1)

  • 3b17227 fix: update session db hook should expect partial session type

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 packages/better-auth/src/types/options.ts (+1 -1)

📄 Description

closes #4793


Summary by cubic

Expect partial session data in the update session DB hook to match update semantics and prevent type errors.

  • Bug Fixes
    • Changed BetterAuthOptions hook return to data: Partial<Session & Record<string, any>>.
    • Aligns typing with update behavior and fixes #4793.

🔄 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/5056 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 10/2/2025 **Status:** ✅ Merged **Merged:** 10/2/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `canary` ← **Head:** `fix/options` --- ### 📝 Commits (1) - [`3b17227`](https://github.com/better-auth/better-auth/commit/3b172279f7c2ec37f08b7ed5d0e748a8ca16f828) fix: update session db hook should expect partial session type ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/types/options.ts` (+1 -1) </details> ### 📄 Description closes #4793 <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Expect partial session data in the update session DB hook to match update semantics and prevent type errors. - **Bug Fixes** - Changed BetterAuthOptions hook return to data: Partial<Session & Record<string, any>>. - Aligns typing with update behavior and fixes #4793. <!-- 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-15 21:11:31 -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#22645