跳至內容
從 NextAuth.js v4 遷移?請閱讀 我們的遷移指南.

Twitch 供應商

資源

設定

回呼 URL

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

環境變數

AUTH_TWITCH_ID
AUTH_TWITCH_SECRET

設定

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

注意事項

  • 如果新增多個重新導向 URI,Twitch 會重新導向至第一個重新導向 URI。
Auth.js © Balázs Orbán 和團隊 -2024