跳至內容
從 NextAuth.js v4 遷移?請閱讀 我們的遷移指南.
開始使用供應商Identity Server4

Identity Server 供應商

💡

此供應商已被棄用,並由 Duende IdentityServer6 取代。

資源

設定

回呼網址

https://example.com/api/auth/callback/identity-server4

環境變數

AUTH_IDENTITY_SERVER4_ID
AUTH_IDENTITY_SERVER4_SECRET
AUTH_IDENTITY_SERVER4_ISSUER

組態

/auth.ts
import NextAuth from "next-auth"
import IdentityServer4 from "next-auth/providers/identity-server4"
 
export const { handlers, auth, signIn, signOut } = NextAuth({
  providers: [IdentityServer4],
})
Auth.js © Balázs Orbán 和團隊 -2024