Include GitHub App installation in connection setup - #2080
Draft
RayTCosgrove wants to merge 2 commits into
Draft
RayTCosgrove wants to merge 2 commits into
RayTCosgrove wants to merge 2 commits into
Conversation
RayTCosgrove
marked this pull request as draft
September 20, 2026 03:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GitHub App authorization can succeed without installing the app, leaving private repositories inaccessible. Include installation and repository selection in the built-in GitHub connection flow: open a setup page, configure access on GitHub, then continue account authorization.
The shared OAuth start path returns this page for web, MCP, and reconnect flows. It keeps the original provider URL, PKCE challenge, and organization state in the existing expiring session. The setup endpoint resolves that session under the caller's ownership policy and ignores caller-supplied continuation URLs. The standalone HTML follows the existing callback renderer, with readable markup/CSS and a shared escaping helper.
The installation link defaults to Executor.sh and can be overridden with
FIRST_PARTY_GITHUB_INSTALLATION_URLfor another deployment's app. It opens in a separate tab, so this flow works without configuring GitHub's optional setup callback. Existing installations can continue directly. The page guides setup; it does not verify installation or organization approval.GitHub documents installation and user authorization as separate grants.
Verification
bun run format:checkbun run lintbun run typecheck— 45 packages passed.scenarios/first-party-oauth.test.ts— 2 passed, including GitHub setup includes installation before authorization.93e334e5e.The recording shows desktop and mobile layouts in both themes, the installation/authorization actions, and recovery after cancellation. The e2e also checks the actual installation destination, retained authorization parameters, no classic GitHub OAuth scopes, and rejection of a supplied continuation URL. Tests stop at the GitHub boundary; no real app installation was performed.
Checklist