[PR #4947] [MERGED] fix: getSession shouldn't expose options and path types #5675

Closed
opened 2026-03-13 12:31:21 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

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

Base: v1.3.x-latestHead: fix/session-type


📝 Commits (1)

  • 3d6d3b7 fix: session type shouldn't expose and

📊 Changes

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

View changed files

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

📄 Description

Summary by cubic

Tightened getSession types by hiding internal options and path, and added returnHeaders support. Also improved SSR client defaults and polished related APIs.

  • Bug Fixes

    • getSession: no longer exposes options/path types; supports returnHeaders; return type includes null.
    • Client: fixed SSR baseURL (defaults to /api/auth when not set).
    • toAuthEndpoints: before hook can return headers/Response correctly.
    • Adapters: transactions disabled by default; safer handling of optional IDs and null references.
  • Tests & Tooling

    • Added e2e: Vite client build, postgres-js migration, and server-side client (API key) tests.
    • CI: pinned actions/setup-node to a commit; fixed Playwright install path.
    • Demo: migrated to Tailwind v4; updated styles and components.
    • Docs: new Convex integration and Okta SAML guide; JWT client usage; blog post and support 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/4947 **Author:** [@Bekacru](https://github.com/Bekacru) **Created:** 9/27/2025 **Status:** ✅ Merged **Merged:** 9/27/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `v1.3.x-latest` ← **Head:** `fix/session-type` --- ### 📝 Commits (1) - [`3d6d3b7`](https://github.com/better-auth/better-auth/commit/3d6d3b70662b6caed596b39ecab63bcb4166a15a) fix: session type shouldn't expose and ### 📊 Changes **1 file changed** (+1 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/types/api.ts` (+1 -7) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Tightened getSession types by hiding internal options and path, and added returnHeaders support. Also improved SSR client defaults and polished related APIs. - **Bug Fixes** - getSession: no longer exposes options/path types; supports returnHeaders; return type includes null. - Client: fixed SSR baseURL (defaults to /api/auth when not set). - toAuthEndpoints: before hook can return headers/Response correctly. - Adapters: transactions disabled by default; safer handling of optional IDs and null references. - **Tests & Tooling** - Added e2e: Vite client build, postgres-js migration, and server-side client (API key) tests. - CI: pinned actions/setup-node to a commit; fixed Playwright install path. - Demo: migrated to Tailwind v4; updated styles and components. - Docs: new Convex integration and Okta SAML guide; JWT client usage; blog post and support 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-03-13 12:31:21 -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#5675