feat(auth): enable OS port selection for OAuth server Use port 0 to …#1152
Closed
harsha08-2k6 wants to merge 2 commits intoGitGuardian:mainfrom
Closed
feat(auth): enable OS port selection for OAuth server Use port 0 to …#1152harsha08-2k6 wants to merge 2 commits intoGitGuardian:mainfrom
harsha08-2k6 wants to merge 2 commits intoGitGuardian:mainfrom
Conversation
…llow OS to automatically assign available port, removing hardcoded port range (8000-8010) from _prepare_server method. This resolves port conflict issues when the OAuth server fails to bind to predefined ports. Fixes GitGuardian#913 Refactor server preparation to use a dynamic port.
sevbch
reviewed
Nov 25, 2025
ggshield/verticals/auth/oauth.py
Outdated
| self._extra_scopes = extra_scopes | ||
|
|
||
| self._prepare_server() | ||
| self.158() |
Collaborator
There was a problem hiding this comment.
Hi, this looks like a typo.
Author
There was a problem hiding this comment.
You're right, thanks for catching that! Fixed in 704e9aa.
sevbch
reviewed
Nov 26, 2025
| if extra_scopes is not None: | ||
| self._extra_scopes = extra_scopes | ||
|
|
||
| self._prepare_server() |
Collaborator
There was a problem hiding this comment.
Since your removed that line, the program is never entering in _prepare_server method that you edited below.
Collaborator
|
Also, please make sure to add a test for the feature you're adding. I'll let you ask for reviews when all of this is done. |
Collaborator
|
closing this PR as @harsha08-2k6 hasn't reacted back for 1 month now |
This file contains hidden or 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
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.
…allow OS to automatically assign available port, removing hardcoded port range (8000-8010) from _prepare_server method. This resolves port conflict issues when the OAuth server fails to bind to predefined ports. Fixes #913
Refactor server preparation to use a dynamic port.
Context
What has been done
Validation
PR check list
skip-changeloglabel has been added to the PR.