Skip to content
需要从 NextAuth.js v4 升级到最新版本吗?请查阅 版本升级指南

TikTok Provider

Resources

Setup

Callback URL

https://example.com/api/auth/callback/tiktok

Environment Variables

AUTH_TIKTOK_ID
AUTH_TIKTOK_SECRET

Configuration

/auth.ts
import NextAuth from "next-auth"
import TikTok from "next-auth/providers/tiktok"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [TikTok],
})

Notes

  • Production applications cannot use localhost URLs to sign in with TikTok. You need add the domain and Callback/Redirect url’s to your TikTok app and have them review and approved by the TikTok Team.
  • Email address is not supported by TikTok.
  • Client_ID will be the Client Key in the TikTok Application