[GH-ISSUE #4602] [bug]: Cannot use the New GitHub Enterprise SSO Feature #1703

Closed
opened 2026-03-16 21:28:43 +03:00 by kerem · 4 comments
Owner

Originally created by @LinhNguyen310 on GitHub (Dec 9, 2024).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4602

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

When I update the GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, and GITHUB_CALLBACK_URL in .env to the appropriate values for my GitHub Enterprise SSO setup, the application still redirects to github.com/auth instead of the expected SSO window for GitHub Enterprise.

Could you please provide detailed guidance on:

  1. The necessary configuration changes.
  2. Any code modifications required.
  3. Best practices for a successful setup.

I’m raising this as a question to better understand the feature, and I’d greatly appreciate any step-by-step instructions or references to documentation. Thank you for your time and assistance!

Steps to reproduce

  1. Update the application configuration with the following values:

GITHUB_CLIENT_ID: [Your Enterprise SSO Client ID]
GITHUB_CLIENT_SECRET: [Your Enterprise SSO Client Secret]
GITHUB_CALLBACK_URL: [Your Enterprise SSO Callback URL]

  1. Restart the application to apply the new configuration.

  2. Attempt to log in using the GitHub authentication flow.

  3. Observe that the redirection still points to github.com/auth instead of the expected SSO window for GitHub Enterprise.

Environment

Production

Version

Self-hosted

Originally created by @LinhNguyen310 on GitHub (Dec 9, 2024). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/4602 ### Is there an existing issue for this? - [X] I have searched the existing issues ### Current behavior When I update the GITHUB_CLIENT_ID, GITHUB_CLIENT_SECRET, and GITHUB_CALLBACK_URL in .env to the appropriate values for my GitHub Enterprise SSO setup, the application still redirects to github.com/auth instead of the expected SSO window for GitHub Enterprise. Could you please provide detailed guidance on: 1. The necessary configuration changes. 2. Any code modifications required. 3. Best practices for a successful setup. I’m raising this as a question to better understand the feature, and I’d greatly appreciate any step-by-step instructions or references to documentation. Thank you for your time and assistance! ### Steps to reproduce 1) Update the application configuration with the following values: GITHUB_CLIENT_ID: [Your Enterprise SSO Client ID] GITHUB_CLIENT_SECRET: [Your Enterprise SSO Client Secret] GITHUB_CALLBACK_URL: [Your Enterprise SSO Callback URL] 2) Restart the application to apply the new configuration. 3) Attempt to log in using the GitHub authentication flow. 4) Observe that the redirection still points to github.com/auth instead of the expected SSO window for GitHub Enterprise. ### Environment Production ### Version Self-hosted
kerem 2026-03-16 21:28:43 +03:00
Author
Owner

@mirarifhasan commented on GitHub (Dec 10, 2024):

Hi @LinhNguyen310,
Thank you for reaching out! Based on your concern, I believe you might be using the Hoppscotch Community Edition. Unfortunately, GitHub Enterprise is not supported in the Community Edition.

<!-- gh-comment-id:2530489343 --> @mirarifhasan commented on GitHub (Dec 10, 2024): Hi @LinhNguyen310, Thank you for reaching out! Based on your concern, I believe you might be using the Hoppscotch Community Edition. Unfortunately, GitHub Enterprise is not supported in the Community Edition.
Author
Owner

@am071092 commented on GitHub (Dec 11, 2024):

Looks like the following PR, which enables GitHub Enterprise as an authentication provider, was merged recently - https://github.com/hoppscotch/hoppscotch/pull/3914.
Is this functionality not usable in the community version?

<!-- gh-comment-id:2533399575 --> @am071092 commented on GitHub (Dec 11, 2024): Looks like the following PR, which enables GitHub Enterprise as an authentication provider, was merged recently - https://github.com/hoppscotch/hoppscotch/pull/3914. Is this functionality not usable in the community version?
Author
Owner

@mirarifhasan commented on GitHub (Dec 11, 2024):

Thank you for pointing that out! To clarify, hoppscotch-common provides the foundational functionality for the app, while the actual support for specific features is determined at the platform level.

In context of the #3914 PR, shared implementation for supporting GitHub Enterprise SSO provider was added which is only enabled at the Hoppscotch Enterprise Edition platform level.

If you notice here in the implementation, there's a reference to additionalLoginItems sourced from the platform level auth configs which isn't defined for Hoppscotch Community Edition, but in place for Hoppscotch Enterprise Edition.

I hope this helps clarify the distinction!

<!-- gh-comment-id:2535351961 --> @mirarifhasan commented on GitHub (Dec 11, 2024): Thank you for pointing that out! To clarify, `hoppscotch-common` provides the foundational functionality for the app, while the actual support for specific features is determined at the platform level. In context of the #3914 PR, shared implementation for supporting GitHub Enterprise SSO provider was added which is only enabled at the Hoppscotch Enterprise Edition platform level. If you notice [here](https://github.com/hoppscotch/hoppscotch/blob/main/packages/hoppscotch-common/src/components/firebase/Login.vue#L206) in the implementation, there's a reference to `additionalLoginItems` sourced from the platform level auth configs which isn't defined for Hoppscotch Community Edition, but in place for Hoppscotch Enterprise Edition. I hope this helps clarify the distinction!
Author
Owner

@am071092 commented on GitHub (Dec 11, 2024):

@mirarifhasan thanks for the clarification. I was able to get hoppscotch login working with GitHub enterprise working by hardcoding the authorizationURL in the GitHub.strategy. However, after pulling the latest release, I started getting the following error:
[Nest] 111 - 12/02/2024, 5:13:59 PM ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'redirect_uri') Backend Server | TypeError: Cannot read properties of undefined (reading 'redirect_uri') Backend Server | at AuthController.githubAuthRedirect (/dist/backend/dist/auth/auth.controller.js:77:89) Backend Server | [Nest] 111 - 12/02/2024, 5:28:01 PM ERROR [ExceptionsHandler] Failed to obtain access token Backend Server | Error: Failed to obtain access token Backend Server | at /dist/backend/node_modules/.pnpm/passport-oauth2@1.8.0/node_modules/passport-oauth2/lib/strategy.js:178:49 Backend Server | at /dist/backend/node_modules/.pnpm/oauth@0.10.0/node_modules/oauth/lib/oauth2.js:214:7 Backend Server | at passBackControl (/dist/backend/node_modules/.pnpm/oauth@0.10.0/node_modules/oauth/lib/oauth2.js:134:9) Backend Server | at IncomingMessage.<anonymous> (/dist/backend/node_modules/.pnpm/oauth@0.10.0/node_modules/oauth/lib/oauth2.js:157:7) Backend Server | at IncomingMessage.emit (node:events:530:35) Backend Server | at endReadableNT (node:internal/streams/readable:1698:12) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:82:21)

Are you aware of any recent changes that might be causing this issue?

<!-- gh-comment-id:2536465405 --> @am071092 commented on GitHub (Dec 11, 2024): @mirarifhasan thanks for the clarification. I was able to get hoppscotch login working with GitHub enterprise working by hardcoding the authorizationURL in the GitHub.strategy. However, after pulling the latest release, I started getting the following error: ` [Nest] 111 - 12/02/2024, 5:13:59 PM ERROR [ExceptionsHandler] Cannot read properties of undefined (reading 'redirect_uri') Backend Server | TypeError: Cannot read properties of undefined (reading 'redirect_uri') Backend Server | at AuthController.githubAuthRedirect (/dist/backend/dist/auth/auth.controller.js:77:89) Backend Server | [Nest] 111 - 12/02/2024, 5:28:01 PM ERROR [ExceptionsHandler] Failed to obtain access token Backend Server | Error: Failed to obtain access token Backend Server | at /dist/backend/node_modules/.pnpm/passport-oauth2@1.8.0/node_modules/passport-oauth2/lib/strategy.js:178:49 Backend Server | at /dist/backend/node_modules/.pnpm/oauth@0.10.0/node_modules/oauth/lib/oauth2.js:214:7 Backend Server | at passBackControl (/dist/backend/node_modules/.pnpm/oauth@0.10.0/node_modules/oauth/lib/oauth2.js:134:9) Backend Server | at IncomingMessage.<anonymous> (/dist/backend/node_modules/.pnpm/oauth@0.10.0/node_modules/oauth/lib/oauth2.js:157:7) Backend Server | at IncomingMessage.emit (node:events:530:35) Backend Server | at endReadableNT (node:internal/streams/readable:1698:12) Backend Server | at process.processTicksAndRejections (node:internal/process/task_queues:82:21)` Are you aware of any recent changes that might be causing this issue?
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#1703
No description provided.