[PR #4395] [MERGED] fix: strict social provider type #22258

Closed
opened 2026-04-15 20:55:05 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4395
Author: @himself65
Created: 9/3/2025
Status: Merged
Merged: 9/3/2025
Merged by: @himself65

Base: canaryHead: himself65/2025/09/03/strict-type


📝 Commits (1)

  • e4390e3 fix: strict social provider type

📊 Changes

2 files changed (+33 additions, -21 deletions)

View changed files

📝 packages/better-auth/src/init.ts (+22 -15)
📝 packages/better-auth/src/social-providers/index.ts (+11 -6)

📄 Description

Summary by cubic

Strengthens type safety for social provider configuration and init flow to catch misconfigurations at compile time. Also types the auth tables in the context for clearer usage.

  • Refactors
    • Introduced SocialProviders type and typed Object.entries (type-fest Entries) for provider setup.
    • Annotated socialProviders to return OAuthProvider; inferred config type via Parameters instead of Prettify.
    • Simplified provider init and preserved disableImplicitSignUp and enabled handling.
    • Updated AuthContext.tables to BetterAuthDbSchema.

🔄 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/4395 **Author:** [@himself65](https://github.com/himself65) **Created:** 9/3/2025 **Status:** ✅ Merged **Merged:** 9/3/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `himself65/2025/09/03/strict-type` --- ### 📝 Commits (1) - [`e4390e3`](https://github.com/better-auth/better-auth/commit/e4390e324b7c8e1d7ca005dce0d2e86e03b66f1b) fix: strict social provider type ### 📊 Changes **2 files changed** (+33 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/init.ts` (+22 -15) 📝 `packages/better-auth/src/social-providers/index.ts` (+11 -6) </details> ### 📄 Description <!-- This is an auto-generated description by cubic. --> ## Summary by cubic Strengthens type safety for social provider configuration and init flow to catch misconfigurations at compile time. Also types the auth tables in the context for clearer usage. - **Refactors** - Introduced SocialProviders type and typed Object.entries (type-fest Entries) for provider setup. - Annotated socialProviders to return OAuthProvider; inferred config type via Parameters instead of Prettify. - Simplified provider init and preserved disableImplicitSignUp and enabled handling. - Updated AuthContext.tables to BetterAuthDbSchema. <!-- 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 20:55:05 -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#22258