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

Foursquare 供應商

資源

設定

回呼網址

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

環境變數

AUTH_FOURSQUARE__ID
AUTH_FOURSQUARE_SECRET

設定

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

注意事項

  • Foursquare 需要額外的 apiVersion 參數,格式為 YYYYMMDD,這基本上表示「我已準備好接受此日期之前的 API 變更」。
Auth.js © Balázs Orbán 和團隊 -2024