Skip to content

Improve Notion OAuth HTTPS error guidance - #25

Closed
Pandakingxbc wants to merge 1 commit into
mainfrom
agent/notion-oauth-https-error
Closed

Improve Notion OAuth HTTPS error guidance#25
Pandakingxbc wants to merge 1 commit into
mainfrom
agent/notion-oauth-https-error

Conversation

@Pandakingxbc

@Pandakingxbc Pandakingxbc commented Jul 20, 2026

Copy link
Copy Markdown
Collaborator

What changed

  • Detect a public HTTP callback before starting Notion OAuth.
  • Return a dedicated CONNECTOR_OAUTH_HTTPS_REQUIRED error with actionable localized guidance instead of the generic invalid-credentials message.
  • Keep the check scoped to Notion; loopback HTTP and all other connectors retain their existing behavior.

Root cause

The OAuth callback is derived from request.base_url. When Octop is accessed through a public HTTP address, Notion rejects dynamic client registration because non-loopback Notion callback URLs must use HTTPS. The existing error path then presents the generic connector credentials message.

Impact

Only Notion OAuth on a public HTTP address receives the new error. No Docker, configuration, callback construction, or MCP transport behavior is changed.

Validation

  • make lint
  • Focused pytest suite: 21 passed
  • The integration test verifies that Notion OAuth is not started for a public HTTP callback and that the dedicated error code is returned

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant