Skip to Content
Anuma SDKExpoInternalFunctionsdiscoverNotionOAuthEndpoints

discoverNotionOAuthEndpoints

discoverNotionOAuthEndpoints(): Promise<NotionOAuthEndpoints>

Defined in: src/lib/auth/notion-primitives.ts:167 

Discover OAuth server metadata from Notion’s well-known endpoints.

Follows the two-step RFC 8414 flow:

  1. /.well-known/oauth-protected-resource to find the authorization server.
  2. <authServer>/.well-known/oauth-authorization-server for metadata.

Falls back to NOTION_OAUTH_CONFIG if discovery fails.

Returns

Promise<NotionOAuthEndpoints>

Last updated on