providers/hubspot
default()
default<P>(options): OAuthConfig<P>
將 HubSpot 登入新增至您的頁面。
設定
回呼網址
https://example.com/api/auth/callback/hubspot
設定
import { Auth } from "@auth/core"
import HubSpot from "@auth/core/providers/hubspot"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
HubSpot({
clientId: HUBSPOT_CLIENT_ID,
clientSecret: HUBSPOT_CLIENT_SECRET,
}),
],
})
資源
注意事項
預設情況下,Auth.js 假設 HubSpot 提供者是基於 OAuth 2 規範。
您需要在您的開發人員帳戶中擁有一個應用程式,如 https://developers.hubspot.com/docs/api/developer-tools-overview 中所述。
💡
HubSpot 提供者帶有預設設定。若要覆寫您使用案例的預設值,請查看自訂內建的 OAuth 提供者。
型別參數
型別參數 |
---|
P extends HubSpotProfile |
參數
參數 | 型別 |
---|---|
options | OAuthUserConfig <P > |
回傳值
OAuthConfig
<P
>