Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion google_auth_oauthlib/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def get_user_credentials(
client_config, scopes=scopes
)

port = find_open_port()
port = find_open_port(start=minimum_port, stop=maximum_port)
if not port:
raise ConnectionError("Could not find open port.")

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def test_get_user_credentials_raises_connectionerror(monkeypatch):
from google_auth_oauthlib import flow
from google_auth_oauthlib import interactive as module_under_test

def mock_find_open_port():
def mock_find_open_port(start=8080, stop=None):
return None

monkeypatch.setattr(module_under_test, "find_open_port", mock_find_open_port)
Expand Down