GitLab login callback port lacks flexibility: high friction when port 8080 is occupied
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
- Domínio
- authentication
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 230k
- Forks
- 31.3k
- Merge médio
- 5h 32min
- PRs com merge (30d)
- 453
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Dificuldade 1/5 1-3 horas Facilidade para iniciantes 88/100
anomalyco/opencode#67064 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 Meio dia Facilidade para iniciantes 82/100
anomalyco/opencode#67009 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
-
area/web type/feature version/v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
anomalyco/opencode#67001 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logTalvez já em andamento @liwenjie200543 assumiu há 2 dias. Abertaarea/plugins platform/linux reproduced type/bug version/v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
anomalyco/opencode#66970 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksTalvez já em andamento @argszero assumiu há 2 dias. Abertaarea/tui platform/wsl status/repro-simulated type/bug version/v2
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
anomalyco/opencode#66773 · 4 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de anomalyco/opencode
Issues semelhantes
-
enhancement feature/signals self-driving team/self-driving
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
PostHog/posthog#144208 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug good first issue web
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
triage: not actionable
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
oxc-project/oxc#30518 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
bug Claude useability
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
Mantenedores costumam responder em até 1 dia