Duende Identity Server 供應商
資源
設定
回呼 URL
https://example.com/api/auth/callback/duende-identity-service
環境變數
AUTH_DUENDE_IDENTITY_SERVER6_ID
AUTH_DUENDE_IDENTITY_SERVER6_SECRET
AUTH_DUENDE_IDENTITY_SERVER6_ISSUER
組態
/auth.ts
import NextAuth from "next-auth"
import DuendeIdentityServer6 from "next-auth/providers/duende-identity-server6"
export const { handlers, auth, signIn, signOut } = NextAuth({
providers: [DuendeIdentityServer6],
})
示範 IdentityServer
以下組態適用於 https://demo.duendesoftware.com/ 的示範伺服器
如果您想嘗試,可以複製並貼上以下組態。
您可以使用 bob
/bob
或 alice
/alice
登入示範服務。
import DuendeIDS6Provider from "next-auth/providers/duende-identity-server6"
providers: [
DuendeIDS6Provider({
clientId: "interactive.confidential",
clientSecret: "secret",
issuer: "https://demo.duendesoftware.com",
}),
]