Skip to content

fix: Use different OAuth App ID for GitHub Enterprise#11990

Closed
jtyr wants to merge 5 commits intoanomalyco:devfrom
jtyr:jtyr-ghe_auth
Closed

fix: Use different OAuth App ID for GitHub Enterprise#11990
jtyr wants to merge 5 commits intoanomalyco:devfrom
jtyr:jtyr-ghe_auth

Conversation

@jtyr
Copy link

@jtyr jtyr commented Feb 3, 2026

What does this PR do?

This PR fixes #3936 by using a different OAuth App ID for GitHub Enterprise login process. The reasoning and more details are described in my comment in that issue.

How did you verify your code works?

bun install
bun dev auth login

I was able to login to our ghe.com instance like that and then use Copilot via OpenCode.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2026

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #6974 - "fix(tui): enable GitHub Copilot Enterprise authentication in /connect…"

Why it might be related: This PR also addresses GitHub Enterprise authentication. Since PR #11990 is specifically about fixing the OAuth App ID for GitHub Enterprise login, and PR #6974 is about enabling GitHub Copilot Enterprise authentication, they may be working on the same underlying authentication issue or related features.

I'd recommend checking PR #6974 to see if it's already addressing the same issue (#3936) or if the approaches overlap.

@jtyr jtyr changed the title fix: Use different OAuth App ID for GitHub Enterprise fix: Use different OAuth App ID for GitHub Enterprise (fixes #3936) Feb 3, 2026
@jtyr jtyr changed the title fix: Use different OAuth App ID for GitHub Enterprise (fixes #3936) fix: Use different OAuth App ID for GitHub Enterprise Feb 3, 2026
@Raviguntakala
Copy link
Contributor

@rekram1-node, could you please review this PR when you get a chance? I have tested it and it is working.

@MarkSchmitt
Copy link

👍 testet it (did my own opencode bun build) - that patch worked for me based on 1.1.53 with a79cca1 cherry-picked🥇

@MarkSchmitt
Copy link

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

PR #6974 - "fix(tui): enable GitHub Copilot Enterprise authentication in /connect…"

* [fix(tui): enable GitHub Copilot Enterprise authentication in /connect… #6974](https://github.com/anomalyco/opencode/pull/6974)

Why it might be related: This PR also addresses GitHub Enterprise authentication. Since PR #11990 is specifically about fixing the OAuth App ID for GitHub Enterprise login, and PR #6974 is about enabling GitHub Copilot Enterprise authentication, they may be working on the same underlying authentication issue or related features.

I'd recommend checking PR #6974 to see if it's already addressing the same issue (#3936) or if the approaches overlap.

I don't think PR #6974 is necessary for copilot oauth ghe login, I've build based on these commits and I was able to do a fresh ghe login:

opencode$ git log -3 --oneline
fa6c2445b (HEAD) Use different OAuth App ID for GitHub Enterprise
579902ace (tag: v1.1.53) release: v1.1.53

@Raviguntakala
Copy link
Contributor

@MarkSchmitt PR #6974 adds support for connecting Github Enterprise from the TUI using the /connect command. Right now, /connect only works with github.com and does not provide an option to connect to GitHub Enterprise so that PR is unrelated with this PR

@rekram1-node
Copy link
Collaborator

Unfortunately we need to setup an actual enterprise app on github to comply w/ rules. Let me see what id u are using here

@Raviguntakala
Copy link
Contributor

Unfortunately we need to setup an actual enterprise app on github to comply w/ rules. Let me see what id u are using here

GitHub Copilot CLI OAuth App ID

@rekram1-node
Copy link
Collaborator

Yeah they dont want us to do that unfortunately, waiting for github app process to complete

@jtyr
Copy link
Author

jtyr commented Feb 17, 2026

The OpenCode OAuth has been approved for GitHub Enterprise so this workaround is not needed anymore.

@jtyr jtyr closed this Feb 17, 2026
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.

Github Enterprise authorization

4 participants