Skip to content

0.3.98

Choose a tag to compare

@github-actions github-actions released this 16 Nov 18:19
bb9aa37
feat(integrations): give PostHog Inbox its own PostHog connection (#256)

PostHog Inbox rules used the PostHog Code connection. PostHog Code is
retired, so a new workspace could not connect PostHog for the Inbox.

- Store the Inbox connection in its own integrations row (posthog_inbox):
  an OAuth grant (openid inbox:read inbox:write task:write) or a personal
  API key. It is not a cloud provider.
- Move the PKCE, state, token and refresh code to posthogOAuth/core.ts,
  shared by PostHog Code and the Inbox. Record the flow kind on the state
  row (migration 0138); each completion refuses the other kind.
- Keep refresh single-flighted per row, with its own advisory lock.
- Add /posthog-inbox oauth/start and config routes behind the
  posthog-inbox-rules flag, not behind the PostHog Code retirement.
- getPostHogInboxConnection uses the Inbox row first, then a PostHog Code
  grant with inbox:read or a PostHog Code key.
- Web and desktop cards connect, reconnect and disconnect on their own;
  mobile shows the state read-only with a web link.
- Update docs.

Co-authored-by: Gilbert09 <1459269+Gilbert09@users.noreply.github.com>