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",
}),
]