跳至內容
從 NextAuth.js v4 遷移?請閱讀 我們的遷移指南.
開始使用提供者42 學校

42 學校提供者

資源

設定

回調網址

https://example.com/api/auth/callback/42-school

環境變數

AUTH_42_SCHOOL_ID
AUTH_42_SCHOOL_SECRET

配置

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

注意事項

  • 42 在 Account 上回傳一個名為 created_at 的欄位,該欄位是一個數字,這與此欄位的預設架構的資料類型不同。請查看42 學校文件以取得更多資訊。如果您正在使用資料庫適配器,請務必在您的資料庫架構中新增或編輯此欄位。
Auth.js © Balázs Orbán 和團隊 -2024