[PR #5131] [CLOSED] refactor: better auth options type #5798

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/5131
Author: @himself65
Created: 10/6/2025
Status: Closed

Base: canaryHead: himself65/2025/10/06/option-type


📝 Commits (1)

  • fc8885b refactor: better auth options type

📊 Changes

4 files changed (+1061 additions, -1041 deletions)

View changed files

📝 packages/better-auth/src/types/options.ts (+2 -1040)
📝 packages/core/src/types/index.ts (+1 -0)
packages/core/src/types/options.ts (+1057 -0)
📝 packages/core/tsconfig.json (+1 -1)

📄 Description

Summary by cubic

Centralized BetterAuthOptions in core and re-exported it from better-auth to remove duplication and reduce external type coupling. No breaking changes; existing imports continue to work.

  • Refactors
    • Added core/types/options.ts with the unified BetterAuthOptions and lightweight external DB placeholders.
    • better-auth now re-exports BetterAuthOptions from @better-auth/core; removed the local type file.
    • Updated core types index to export BetterAuthOptions and added "bun" to tsconfig types.

🔄 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/5131 **Author:** [@himself65](https://github.com/himself65) **Created:** 10/6/2025 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `himself65/2025/10/06/option-type` --- ### 📝 Commits (1) - [`fc8885b`](https://github.com/better-auth/better-auth/commit/fc8885bbd6310ee12b7d472142942ce7c8773585) refactor: better auth options type ### 📊 Changes **4 files changed** (+1061 additions, -1041 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/types/options.ts` (+2 -1040) 📝 `packages/core/src/types/index.ts` (+1 -0) ➕ `packages/core/src/types/options.ts` (+1057 -0) 📝 `packages/core/tsconfig.json` (+1 -1) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Centralized BetterAuthOptions in core and re-exported it from better-auth to remove duplication and reduce external type coupling. No breaking changes; existing imports continue to work. - **Refactors** - Added core/types/options.ts with the unified BetterAuthOptions and lightweight external DB placeholders. - better-auth now re-exports BetterAuthOptions from @better-auth/core; removed the local type file. - Updated core types index to export BetterAuthOptions and added "bun" to tsconfig types. <!-- 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:36:36 -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#5798