mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 01:06:00 +03:00
[GH-ISSUE #4602] [bug]: Cannot use the New GitHub Enterprise SSO Feature #1703
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#1703
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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?
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:
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
GITHUB_CLIENT_ID: [Your Enterprise SSO Client ID]
GITHUB_CLIENT_SECRET: [Your Enterprise SSO Client Secret]
GITHUB_CALLBACK_URL: [Your Enterprise SSO Callback URL]
Restart the application to apply the new configuration.
Attempt to log in using the GitHub authentication flow.
Observe that the redirection still points to github.com/auth instead of the expected SSO window for GitHub Enterprise.
Environment
Production
Version
Self-hosted
@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.
@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?
@mirarifhasan commented on GitHub (Dec 11, 2024):
Thank you for pointing that out! To clarify,
hoppscotch-commonprovides 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
additionalLoginItemssourced 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!
@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?