GitLab login callback port lacks flexibility: high friction when port 8080 is occupied
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 30/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- authentication
Piste de recherche
Start in gitlab.ts, where the bundled GitLab OAuth redirect URI on port 8080 is hardcoded, and compare it with the callbackPort and callbackFallbackPort handling and bindWithRetry in openai.ts. The issue asks maintainers to choose a direction first, so confirm that before coding. Done means the callback port is configurable or falls back, and the 11 GitLab OAuth tests pass with 8080 occupied.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Current behavior
The bundled GitLab OAuth application is registered with the redirect URI http://127.0.0.1:8080/callback, and GitLab matches redirect_uri exactly, so the port cannot be ephemeral (as noted in gitlab.ts). When port 8080 is occupied on the user's machine — proxies and dev servers commonly are — login fails with:
"GitLab login needs local port 8080, but it is already in use. Stop the process using that port and try again."
Impact
The error message does offer an escape hatch — stop whatever occupies the port — but that is often impractical: the occupying process may be another project's dev server or a system proxy that the user cannot simply kill. For users who cannot patch the code and register their own OAuth application, the remaining options are all poor. We reproduced the underlying fragility: 11 GitLab OAuth tests fail in any environment where 8080 is taken.
Suggestions (three layers)
Quick win: support a GITLAB_OAUTH_CALLBACK_PORT (or similar) env var. Self-managed users can already override the client ID via GITLAB_OAUTH_CLIENT_ID, but the callback port stays hardcoded — so the escape hatch is incomplete today.
Permanent fix: the bundled application is instance-owned, so registering a fallback redirect URI (e.g. http://127.0.0.1:1457/callback) is entirely in this project's hands — the OpenAI provider already does exactly this (callbackPort 1455 + callbackFallbackPort 1457 in openai.ts).
Wiring: implement occupied-port detection with automatic fallback and retry (the bindWithRetry pattern already exists in openai.ts), so the fallback activates as soon as the extra redirect URI is registered — zero user action needed.
Lifecycle: the env-var escape hatch remains as a fallback after the permanent fix lands; it does not compete with it. Before the permanent fix ships, users still have a bridge.
Happy to hear maintainers' thoughts on the direction first — a test-side fix PR is ready to follow once aligned.
- Langage dominant
- TypeScript
- Étoiles
- 230k
- Forks
- 31.3k
- Merge moyen
- 5 h 32 min
- PR mergées (30 j)
- 453
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
anomalyco/opencode#67064 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 Une demi-journée Accessibilité débutants 82/100
anomalyco/opencode#67009 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
area/web type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
anomalyco/opencode#67001 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logPeut-être pris @liwenjie200543 l’a pris il y a 2 jours. Ouvertearea/plugins platform/linux reproduced type/bug version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
anomalyco/opencode#66970 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksPeut-être pris @argszero l’a pris il y a 2 jours. Ouvertearea/tui platform/wsl status/repro-simulated type/bug version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
anomalyco/opencode#66773 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de anomalyco/opencode
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
ci
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ClickHouse/clickhouse-js#1248 ·
Les mainteneurs répondent en général sous 1 jour
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltOuvertetechnik
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
AhmedNAgy25/analysor#25 ·
Les mainteneurs répondent en général sous 1 jour