providers/notion
NotionProfile
繼承
Record
<string
,any
>
屬性
access_token
access_token: string;
bot_id
bot_id: string;
duplicated_template_id
duplicated_template_id: string;
owner?
optional owner: Owner;
workspace_icon
workspace_icon: string;
workspace_id
workspace_id: number;
workspace_name
workspace_name: string;
Owner
屬性
type
type: string;
user
user: User;
Person
繼承
Record
<string
,any
>
屬性
email: string;
User
繼承
Record
<string
,any
>
屬性
avatar_url
avatar_url: null | string;
id
id: string;
name
name: string;
object
object: "user" | "bot";
owner?
optional owner: {
type: "user" | "workspace";
workspace: string;
};
type
type: "user" | "workspace";
workspace
workspace: string;
person
person: Person;
type
type: string;
workspace_name?
optional workspace_name: null | string;
default()
default<P>(options): OAuthConfig<P>
將 Notion 登入新增到您的頁面。
設定
回調 URL
https://example.com/api/auth/callback/notion
組態設定
import { Auth } from "@auth/core"
import Notion from "@auth/core/providers/notion"
const request = new Request(origin)
const response = await Auth(request, {
providers: [
Notion({
clientId: NOTION_CLIENT_ID,
clientSecret: NOTION_CLIENT_SECRET,
redirectUri: NOTION_CLIENT_REDIRECT_URI,
}),
],
})
資源
注意事項
您需要在組態設定頁面中選取「公開整合」,才能取得 oauth_id
和 oauth_secret
。 私人整合不會提供這些詳細資料。您必須提供 clientId
和 clientSecret
才能使用此供應商,以及重新導向 URI (因為 Notion 端點需要它才能擷取權杖)。
💡
Notion 供應商具有預設組態。若要覆寫您使用案例的預設值,請查看自訂內建 OAuth 供應商。
類型參數
類型參數 |
---|
P 延伸 NotionProfile |
參數
參數 | 類型 |
---|---|
options | OAuthUserConfig <P > & AdditionalConfig |
返回
OAuthConfig
<P
>