跳到內容
從 NextAuth.js v4 遷移?請閱讀 我們的遷移指南.
開始使用供應商長毛象 (Mastodon)

長毛象 (Mastodon) 供應商

資源

設定

回呼 URL

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

環境變數

AUTH_MASTODON_ID
AUTH_MASTODON_SECRET
AUTH_MASTODON_ISSUER

組態

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

注意事項

  • 由於長毛象的架構方式,您必須將 issuer 定義為您要驗證的實例 URL
Auth.js © Balázs Orbán 和團隊 -2024