[PR #397] [MERGED] feat: add TikTok social provider #11516

Closed
opened 2026-04-13 07:49:46 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/397
Author: @DewinU
Created: 11/2/2024
Status: Merged
Merged: 2/28/2025
Merged by: @Bekacru

Base: mainHead: feat/tiktok_social_provider


📝 Commits (10+)

  • f7df5c8 feat: add TikTok social provider integration with client key support
  • c0136c5 Merge branch 'main' into feat/tiktok_social_provider
  • b8909c2 Merge branch 'better-auth:main' into feat/tiktok_social_provider
  • 72a8d63 Merge branch 'main' into feat/tiktok_social_provider
  • 95959da chore: lint
  • 41b042d deleted duplicate typeof
  • 98dd9d6 changing verbose of the parameter clientId to client key
  • d085601 chore: lint
  • 2937718 test: gracefully handle oauth mock server stop
  • 6a4a41f test: update generic-oauth test server port from 8080 to 8081

📊 Changes

6 files changed (+202 additions, -11 deletions)

View changed files

📝 packages/better-auth/src/oauth2/types.ts (+5 -0)
📝 packages/better-auth/src/oauth2/validate-authorization-code.ts (+1 -0)
📝 packages/better-auth/src/plugins/generic-oauth/generic-oauth.test.ts (+8 -8)
📝 packages/better-auth/src/plugins/sso/sso.test.ts (+1 -1)
📝 packages/better-auth/src/social-providers/index.ts (+5 -2)
packages/better-auth/src/social-providers/tiktok.ts (+182 -0)

📄 Description

This pull request introduces support for TikTok as a new social provider. The changes include updates to the OAuth2 types and validation, as well as the addition of the TikTok provider implementation.

Considerations

  • In the social provider configuration we need to add clientId, clientSecretandclientKey` since Tiktok uses the three of them.
socialProviders: {
   tiktok : {
                  clientId: process.env.TIKTOK_CLIENT_ID || "",
	          clientSecret: process.env.TIKTOK_CLIENT_SECRET || "",
	          clientKey: process.env.TIKTOK_CLIENT_KEY || "",
		}
}

Demo (Updated 02-28-2025)

https://youtu.be/CGccuc6r3Nw?si=31ldV3iVNyN1uAw7


🔄 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/397 **Author:** [@DewinU](https://github.com/DewinU) **Created:** 11/2/2024 **Status:** ✅ Merged **Merged:** 2/28/2025 **Merged by:** [@Bekacru](https://github.com/Bekacru) **Base:** `main` ← **Head:** `feat/tiktok_social_provider` --- ### 📝 Commits (10+) - [`f7df5c8`](https://github.com/better-auth/better-auth/commit/f7df5c80aa84d0615b263ac9ee8d8289b0010b04) feat: add TikTok social provider integration with client key support - [`c0136c5`](https://github.com/better-auth/better-auth/commit/c0136c51c28aed4e670e66837cdb26e61b28df0f) Merge branch 'main' into feat/tiktok_social_provider - [`b8909c2`](https://github.com/better-auth/better-auth/commit/b8909c240cda6bf164089090960a042185c11474) Merge branch 'better-auth:main' into feat/tiktok_social_provider - [`72a8d63`](https://github.com/better-auth/better-auth/commit/72a8d630915620b8bb9e80f880decc07c1bac954) Merge branch 'main' into feat/tiktok_social_provider - [`95959da`](https://github.com/better-auth/better-auth/commit/95959da1d1df0e17769b1a60dc1f58cd2ac7f9a5) chore: lint - [`41b042d`](https://github.com/better-auth/better-auth/commit/41b042df610c4912f3b69b24d7318a1d879c8511) deleted duplicate typeof - [`98dd9d6`](https://github.com/better-auth/better-auth/commit/98dd9d6a1048429ef258a6b9241260144e8a222a) changing verbose of the parameter clientId to client key - [`d085601`](https://github.com/better-auth/better-auth/commit/d08560143f3a9db22c536c358b5307e44e2499db) chore: lint - [`2937718`](https://github.com/better-auth/better-auth/commit/293771880241a7e538255a897bcf07ba817b90a4) test: gracefully handle oauth mock server stop - [`6a4a41f`](https://github.com/better-auth/better-auth/commit/6a4a41fac1f31477c4f4f5d6caea6b4519a81939) test: update generic-oauth test server port from 8080 to 8081 ### 📊 Changes **6 files changed** (+202 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `packages/better-auth/src/oauth2/types.ts` (+5 -0) 📝 `packages/better-auth/src/oauth2/validate-authorization-code.ts` (+1 -0) 📝 `packages/better-auth/src/plugins/generic-oauth/generic-oauth.test.ts` (+8 -8) 📝 `packages/better-auth/src/plugins/sso/sso.test.ts` (+1 -1) 📝 `packages/better-auth/src/social-providers/index.ts` (+5 -2) ➕ `packages/better-auth/src/social-providers/tiktok.ts` (+182 -0) </details> ### 📄 Description This pull request introduces support for TikTok as a new social provider. The changes include updates to the OAuth2 types and validation, as well as the addition of the TikTok provider implementation. ### Considerations - In the social provider configuration we need to add `clientId`, clientSecret` and `clientKey` since Tiktok uses the three of them. ```ts socialProviders: { tiktok : { clientId: process.env.TIKTOK_CLIENT_ID || "", clientSecret: process.env.TIKTOK_CLIENT_SECRET || "", clientKey: process.env.TIKTOK_CLIENT_KEY || "", } } ``` ### Demo (Updated 02-28-2025) https://youtu.be/CGccuc6r3Nw?si=31ldV3iVNyN1uAw7 --- <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-13 07:49:46 -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#11516