コンテンツへスキップ
NextAuth.js v4 からの移行ですか?こちらをお読みください 移行ガイド.
はじめにプロバイダーDuende Identity Server6

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",
  }),
]
Auth.js © Balázs Orbán and Team -2024