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 extends NotionProfile |
パラメーター
パラメーター | 型 |
---|---|
options | OAuthUserConfig <P > & AdditionalConfig |
戻り値
OAuthConfig
<P
>