Notion
Notion public-integration OAuth2. No PKCE, no id token, and no OAuth scopes — permissions live in the integration's capabilities.
Configure
python
from better_auth import BetterAuth
from better_auth.oauth.providers_ext import Notion
auth = BetterAuth(
secret=...,
social_providers={
"notion": Notion(client_id="…", client_secret="…"),
},
)Or name-keyed (no import):
python
auth = BetterAuth(
secret=...,
social_providers={
"notion": {"client_id": "…", "client_secret": "…"},
},
)Options
| Field | Type | Default | Notes |
|---|---|---|---|
client_id | str | list[str] | required | |
client_secret | str | required |
All shared ProviderConfig options apply.
Notes
- Default scopes: none (Notion's permission model is the integration's capabilities, not OAuth scopes).
- Register
{base_url}{base_path}/callback/notionas the redirect URI on the public integration. owner=useris always sent on the authorize URL (defaultauthorize_params).- Token-endpoint client auth is basic (RFC 7617) — Notion rejects the body-post form.
- Userinfo is
GET /v1/users/mewith aNotion-Version: 2022-06-28header; the actual user profile is nested atbot.owner.user.emailcan be absent, andemail_verifiedis alwaysFalse.