[PR #4002] [MERGED] fix: never type still requires setting clientId to never #30731

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

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/4002
Author: @szcharlesji
Created: 8/14/2025
Status: Merged
Merged: 8/29/2025
Merged by: @himself65

Base: canaryHead: fix-tiktok


📝 Commits (4)

  • 602d837 fix: never type still requires setting clientId to never
  • 810a2e0 docs: update docs for tiktok
  • 330b653 Merge branch 'canary' into fix-tiktok
  • 83fae31 fix: make as partial

📊 Changes

3 files changed (+7 additions, -5 deletions)

View changed files

📝 docs/content/docs/authentication/tiktok.mdx (+1 -2)
📝 packages/better-auth/src/oauth2/types.ts (+1 -1)
📝 packages/better-auth/src/social-providers/tiktok.ts (+5 -2)

📄 Description

Right now clientId is still required. We have to use clientId: undefined as never right now. The fix makes it optional.

  • No Type Errors: Legacy users can keep clientId in their config without TypeScript complaining.
  • No Requirement for New Users: New users can set up the provider without clientId.
  • Runtime Safety: The logic ensures the obsolete clientId is never actually used, making the integration robust.

Summary by cubic

Made the clientId field optional in the TikTok provider config so it's no longer required for TypeScript users or new integrations.

  • Migration
  • Legacy configs with clientId will not cause type errors.
  • New setups do not need clientId at all.

🔄 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/4002 **Author:** [@szcharlesji](https://github.com/szcharlesji) **Created:** 8/14/2025 **Status:** ✅ Merged **Merged:** 8/29/2025 **Merged by:** [@himself65](https://github.com/himself65) **Base:** `canary` ← **Head:** `fix-tiktok` --- ### 📝 Commits (4) - [`602d837`](https://github.com/better-auth/better-auth/commit/602d8373e5e46049c816fa1652b1cbf57782a922) fix: never type still requires setting clientId to never - [`810a2e0`](https://github.com/better-auth/better-auth/commit/810a2e0937901c64297a2e42673755efbd53e0f2) docs: update docs for tiktok - [`330b653`](https://github.com/better-auth/better-auth/commit/330b65300fc8266f75fac094b7a39a7a56109788) Merge branch 'canary' into fix-tiktok - [`83fae31`](https://github.com/better-auth/better-auth/commit/83fae319450784ac5cd1a381ed5c1b1eec597d33) fix: make as partial ### 📊 Changes **3 files changed** (+7 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/docs/authentication/tiktok.mdx` (+1 -2) 📝 `packages/better-auth/src/oauth2/types.ts` (+1 -1) 📝 `packages/better-auth/src/social-providers/tiktok.ts` (+5 -2) </details> ### 📄 Description Right now `clientId` is still required. We have to use `clientId: undefined as never` right now. The fix makes it optional. - No Type Errors: Legacy users can keep clientId in their config without TypeScript complaining. - No Requirement for New Users: New users can set up the provider without clientId. - Runtime Safety: The logic ensures the obsolete clientId is never actually used, making the integration robust. <!-- This is an auto-generated description by cubic. --> --- ## Summary by cubic Made the clientId field optional in the TikTok provider config so it's no longer required for TypeScript users or new integrations. - **Migration** - Legacy configs with clientId will not cause type errors. - New setups do not need clientId at all. <!-- 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:45:28 -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#30731