-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ feat: added Github Enterprise SSO login #5621
Merged
danny-avila
merged 6 commits into
danny-avila:main
from
rubentalstra:feat/github-enterprise
Feb 3, 2025
Merged
✨ feat: added Github Enterprise SSO login #5621
danny-avila
merged 6 commits into
danny-avila:main
from
rubentalstra:feat/github-enterprise
Feb 3, 2025
Conversation
This file contains 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
Going to refactor this so it would be or the normal GitHub url or a custom url. I think this is a better strategy then adding another auth option. |
refactoring done. |
danny-avila
requested changes
Feb 3, 2025
danny-avila
approved these changes
Feb 3, 2025
justinmdickey
pushed a commit
to e-gineering/LibreChat
that referenced
this pull request
Feb 7, 2025
* danny-avila#2812 * refactored the code to simplify it. * removed unneeded code * removed unneeded code
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
Closes: #2812
Docs: LibreChat-AI/librechat.ai#217
This pull request enhances our GitHub OAuth integration by adding support for GitHub Enterprise authentication. When the environment variable
GITHUB_ENTERPRISE_BASE_URL
is provided, the GitHub strategy will automatically switch to using GitHub Enterprise endpoints. In addition, minor adjustments have been made to the social login registration to ensure everything integrates smoothly.Key Changes
Environment Variables:
The example configuration now includes (commented) variables for GitHub Enterprise:
GITHUB_ENTERPRISE_BASE_URL
GITHUB_ENTERPRISE_USER_AGENT
This allows users to optionally configure GitHub Enterprise without affecting the default GitHub login behavior.
GitHub Strategy Update:
In
api/strategies/githubStrategy.js
, the GitHub OAuth strategy now conditionally uses GitHub Enterprise endpoints ifGITHUB_ENTERPRISE_BASE_URL
is defined:GITHUB_ENTERPRISE_USER_AGENT
is set, it is passed along in the request options.Change Type
Testing
Test Configuration:
.env
or configuration file, enable GitHub Enterprise support by setting the following variables:Checklist