providers/identity-server4
default()
default(options): OAuthConfig<Record<string, any>>
將 IdentityServer4 登入新增至您的頁面。
設定
回調網址
https://example.com/api/auth/callback/identity-server4
組態
import { Auth } from "@auth/core"
import IdentityServer4 from "@auth/core/providers/identity-server4"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
IdentityServer4({
clientId: IDENTITY_SERVER4_CLIENT_ID,
clientSecret: IDENTITY_SERVER4_CLIENT_SECRET,
issuer: IDENTITY_SERVER4_ISSUER,
}),
],
})
資源
注意事項
預設情況下,Auth.js 假設 IdentityServer4 提供者基於 Open ID Connect 規範。
⚠️
IdentityServer4 已停止開發,僅在 2022 年 11 月之前發布安全性更新。您應該考慮其他替代提供者。
💡
IdentityServer4 提供者帶有 預設組態。若要覆寫您的使用案例預設值,請查看自訂內建 OAuth 提供者。
參數
參數 | 類型 |
---|---|
options | OAuthUserConfig <Record <string , any >> |
回傳
OAuthConfig
<Record
<string
, any
>>