Skip to content

docs: Document required OAuth scopes for the basic integration program#513

Draft
gewenyu99 wants to merge 1 commit into
mainfrom
posthog-code/document-oauth-scopes
Draft

docs: Document required OAuth scopes for the basic integration program#513
gewenyu99 wants to merge 1 commit into
mainfrom
posthog-code/document-oauth-scopes

Conversation

@gewenyu99
Copy link
Copy Markdown
Collaborator

Problem

The set of OAuth scopes the wizard's main basic integration program requests at login wasn't documented anywhere operators can find it. The scopes are defined in WIZARD_OAUTH_SCOPES (src/lib/constants.ts), but each one must also be granted on the PostHog OAuth application in every region — and there was no operator-facing reference for that list, nor a guard against the README drifting from the constant.

notebook:write was recently granted on the OAuth app (US + EU) for the notebooks MCP tools, but the wizard didn't actually request it.

Changes

  • README — new "OAuth Scopes" section: a table of every requested scope with its justification, a copy-pasteable comma-separated list for granting scopes on the OAuth application, and a note pointing at constants.ts as the source of truth.
  • src/lib/constants.ts — add notebook:write to WIZARD_OAUTH_SCOPES so the code requests the scope it documents; add a reverse pointer in the header comment back to the README's section.
  • MAINTAINING-SKILLS.md — note for future agents: whenever a scope changes in constants.ts, update the README scopes table in the same change and confirm the scope is granted in every region.

Test plan

  • pnpm build — passes
  • pnpm test — 760 tests pass (49 suites)
  • pnpm fix — formatting clean
  • Docs-only + one additive scope; no behavior beyond requesting the already-granted notebook:write scope at login.

Created with PostHog Code

Add a README "OAuth Scopes" section documenting the full scope set the
wizard's main basic integration program requests during the OAuth login
flow, with a copy-pasteable list for granting scopes on the OAuth
application in each region.

Add `notebook:write` to `WIZARD_OAUTH_SCOPES` in constants.ts so the code
actually requests the scope it now documents (the OAuth app was granted
`notebook:write` in both US and EU for the notebooks MCP tools), and add a
reverse pointer in its header comment back to the README.

Plant a note in the wizard-development MAINTAINING-SKILLS reference so
future agents keep the README scopes table in sync with the constant
whenever scopes change.

Generated-By: PostHog Code
Task-Id: e5fcb78f-1b7c-4ce5-8ba4-c825400b2d98
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 4, 2026

🧙 Wizard CI

Run the Wizard CI and test your changes against wizard-workbench example apps by replying with a GitHub comment using one of the following commands:

Test all apps:

  • /wizard-ci all

Test all apps in a directory:

  • /wizard-ci basic-integration
  • /wizard-ci error-tracking-upload-source-maps
  • /wizard-ci misc
  • /wizard-ci revenue

Test an individual app:

  • /wizard-ci basic-integration/android
  • /wizard-ci basic-integration/angular
  • /wizard-ci basic-integration/astro
Show more apps
  • /wizard-ci basic-integration/django
  • /wizard-ci basic-integration/fastapi
  • /wizard-ci basic-integration/flask
  • /wizard-ci basic-integration/javascript-node
  • /wizard-ci basic-integration/javascript-web
  • /wizard-ci basic-integration/laravel
  • /wizard-ci basic-integration/next-js
  • /wizard-ci basic-integration/nuxt
  • /wizard-ci basic-integration/python
  • /wizard-ci basic-integration/rails
  • /wizard-ci basic-integration/react-native
  • /wizard-ci basic-integration/react-router
  • /wizard-ci basic-integration/sveltekit
  • /wizard-ci basic-integration/swift
  • /wizard-ci basic-integration/tanstack-router
  • /wizard-ci basic-integration/tanstack-start
  • /wizard-ci basic-integration/vue
  • /wizard-ci error-tracking-upload-source-maps/android
  • /wizard-ci error-tracking-upload-source-maps/flutter
  • /wizard-ci error-tracking-upload-source-maps/ios
  • /wizard-ci error-tracking-upload-source-maps/next
  • /wizard-ci error-tracking-upload-source-maps/next-no-posthog
  • /wizard-ci error-tracking-upload-source-maps/node-raw
  • /wizard-ci error-tracking-upload-source-maps/node-rollup
  • /wizard-ci error-tracking-upload-source-maps/node-rollup-typescript-plugin
  • /wizard-ci error-tracking-upload-source-maps/node-webpack
  • /wizard-ci error-tracking-upload-source-maps/nuxt-3-6
  • /wizard-ci error-tracking-upload-source-maps/nuxt-4-3
  • /wizard-ci error-tracking-upload-source-maps/react-native
  • /wizard-ci error-tracking-upload-source-maps/react-vite
  • /wizard-ci error-tracking-upload-source-maps/rust
  • /wizard-ci misc/quack-quack
  • /wizard-ci revenue/stripe

Results will be posted here when complete.

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