NotionProvider (providers/notion.ts)

next-auth · packages/core/src/providers/notion.ts · typescript · ISC
auth, Auth / Identity

OAuth provider for Notion integration in NextAuth, handling auth flow and user profile.

// Source: https://github.com/nextauthjs/next-auth | License: ISC | Copyright 2022-2024, Balázs Orbán
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * <div class="provider" style={{backgroundColor: "#000", display: "flex", justifyContent: "space-between", color: "#fff", padding: 16}}>
 * <span>Built-in <b>Notion</b> integration.</span>
 * <a href="https://notion.so">
 *   <img style={{display: "block"}} src="https://authjs.dev/img/providers/notion.svg" height="48" width="48"/>
 * </a>
 * </div>
 *
 * @module providers/notion
 */

import type { OAuthConfig, OAuthUserConfig } from "./oauth.js"

export interface Person extends Record<string, any> {
  email: string
}

// https://developers.notion.com/reference/user
export interface User extends Record<string, any> {
  ob

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key