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