Skip to content

fix(github): confirm the installer through GitHub's authorization when setup brings no code - #885

Merged
artempartos merged 1 commit into
developfrom
artempartos/internal-company-tenant-setup
Nov 25, 2026
Merged

artempartos merged 1 commit into
developfrom
artempartos/internal-company-tenant-setup

Conversation

@artempartos

Copy link
Copy Markdown
Contributor

With GITHUB_APP_VERIFY_INSTALLATION_OWNER on, a company could not connect a GitHub organization that already had the App installed for another company. GitHub sends a code on the setup redirect only for a new installation with "Request user authorization (OAuth) during installation" on; Configure → Save on an existing installation (setup_action=update) never carries one, so the check always failed with "Could not confirm you have access to this GitHub installation". Confirmed on staging.

The setup callback now sends a person who arrives without a code through GitHub's authorization of the App, back to /company/integrations/github_setup with the installation id in the signed state, and verifies the code that comes back. The App needs that path among its Redirect URIs; the OAuth-during-installation switch is no longer needed. The project move screen now also says plainly that the target company cannot reconnect a GitHub installation the source still holds elsewhere.

🤖 Generated with Claude Code

…n setup brings no code

GitHub puts a `code` on the setup redirect only for a new installation with
"Request user authorization (OAuth) during installation" on. Configuring an
installation that already exists (setup_action=update) never carries one, so
with GITHUB_APP_VERIFY_INSTALLATION_OWNER on, a second company could never
connect an organization that already had the App, and every Configure round
trip ended in "Could not confirm you have access". Checked on staging.

The setup callback now sends a person who arrives without a code through
GitHub's authorization of the App, back to the same callback with the
installation id in the signed state, and checks the code it returns. The App
needs the callback among its Redirect URIs; the OAuth-during-installation
switch is no longer needed.

The project move screen now says that the target company cannot connect a
GitHub installation the source still holds elsewhere.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Artem Petrov <[email protected]>
@artempartos
artempartos merged commit 3706e89 into develop Nov 25, 2026
18 checks passed
artempartos added a commit that referenced this pull request Nov 25, 2026
* origin/develop:
  fix(repositories): fail a session before its agent starts when a repository does not clone (#890)
  fix(email): refuse addresses whose domain has no dot (#865)
  feat(runs): link a run to its board task, and filter runs by task (#887)
  fix(github): confirm the installer through GitHub's authorization when setup brings no code (#885)

# Conflicts:
#	CHANGELOG.md
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