コンテンツへスキップ
NextAuth.js v4からの移行?こちらを ご覧ください.

providers/duende-identity-server6

組み込みのDuendeIdentityServer6統合。

DuendeISUser

拡張

プロパティ

email

email: string;

id

id: string;

name

name: string;

verified

verified: boolean;

default()

default<P>(options): OAuthConfig<P>

DuendeIdentityServer6ログインをページに追加します。

設定

コールバックURL

https://example.com/api/auth/callback/duende-identity-server6

設定

import { Auth } from "@auth/core"
import DuendeIdentityServer6 from "@auth/core/providers/duende-identity-server6"
 
const request = new Request(origin)
const response = await Auth(request, {
  providers: [
    DuendeIdentityServer6({
      clientId: DIS6_CLIENT_ID,
      clientSecret: DIS6_CLIENT_SECRET,
      issuer: DIS6_ISSUER,
    }),
  ],
})

リソース

備考

デモIdentityServer

以下の設定は、https://demo.duendesoftware.com/にあるデモサーバー用です。

試したい場合は、以下の設定をコピーして貼り付けてください。

デモサービスには、bob/bobまたはalice/aliceのいずれかでサインインできます。

import DuendeIdentityServer6 from "@auth/core/providers/duende-identity-server6"
providers: [
  DuendeIdentityServer6({
    clientId: "interactive.confidential",
    clientSecret: "secret",
    issuer: "https://demo.duendesoftware.com",
  })
]

デフォルトでは、Auth.jsはDuendeIdentityServer6プロバイダーがOpen ID Connect仕様に基づいていると想定しています。

💡

DuendeIdentityServer6プロバイダーには、デフォルトの設定が付属しています。ユースケースに合わせてデフォルトを上書きするには、組み込みOAuthプロバイダーのカスタマイズをご覧ください。

免責事項 デフォルトの設定のバグを見つけたと思われる場合は、問題を報告できます。

Auth.jsは厳密に仕様に準拠しており、プロバイダーによる仕様からのずれに対して責任を負うことはできません。問題を報告できますが、問題が仕様への非準拠である場合、解決策を追求しない可能性があります。ディスカッションでさらにヘルプを依頼できます。

型パラメーター

型パラメーター
P extends DuendeISUser

パラメーター

パラメーター
optionsOAuthUserConfig<P>

戻り値

OAuthConfig<P>

Auth.js © Balázs Orbán氏および開発チーム -2024