providers/wordpress
default()
default(config): OAuthConfig<Record<string, any>>
在您的頁面新增 WordPress 登入功能。
設定
回調網址
https://example.com/api/auth/callback/wordpress
組態
import { Auth } from "@auth/core"
import WordPress from "@auth/core/providers/wordpress"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
WordPress({
clientId: WORKPRESS_CLIENT_ID,
clientSecret: WORKPRESS_CLIENT_SECRET,
}),
],
})
資源
注意事項
預設情況下,Auth.js 假設 WordPress 供應商是基於 OAuth 2 規範。
💡
WordPress 供應商帶有預設組態。若要覆寫您的使用案例的預設值,請查看自訂內建 OAuth 供應商。
參數
參數 | 類型 |
---|---|
config | OAuthUserConfig <Record <string , any >> |
返回值
OAuthConfig
<Record
<string
, any
>>