gws auth login --help (and -h) is silently ignored — starts the OAuth flow instead of printing help
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
- #835 de @nuthalapativarun — cerrado sin fusionar
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- rust
- Área
- authentication, cli
Línea de trabajo
Start at the gws auth <method> dispatch and compare it with the working top-level and helper-command help paths. Reproduce gws auth login --help, -h, and the other auth methods without triggering their real actions. Done means each auth method prints its help and exits before OAuth, setup, status, export, or logout side effects occur.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
gws auth <method> --help (and -h) is silently ignored — the help flag does not print help, and the subcommand executes
its real action instead. This is at minimum surprising and at worst dangerous for auth login, which triggers an OAuth
flow (printing an authorization URL and waiting on stdin) when the user only intended to read the help text.
Other gws commands handle --help correctly, which makes the inconsistency the most notable part.
Reproduction
Tested on @googleworkspace/cli 0.18.1, macOS 26.4.1, Node 24.14.0.
$ gws auth login --help
Open this URL in your browser to authenticate:
https://accounts.google.com/o/oauth2/auth?scope=...&redirect_uri=http://localhost:52908&...
# → starts a real OAuth flow, binds a localhost redirect port, waits on stdin
$ gws auth login -h
# same — starts the OAuth flow
$ gws auth setup --help
Step 1/6: Checking for gcloud CLI...
✓ gcloud CLI found
# → starts the real interactive setup wizard
$ gws auth status --help
Using keyring backend: keyring
# → runs the status command
For comparison, these work correctly:
$ gws --help
gws — Google Workspace CLI
USAGE: ...
# ✓ prints help
$ gws auth # no subcommand
Usage: gws auth <login|setup|status|export|logout> [options]
# ✓ prints help (this is what `--help` should produce too)
$ gws gmail +triage --help
[Helper] Show unread inbox summary (sender, subject, date)
Usage: gws +triage [OPTIONS]
Options: ...
# ✓ prints help
So --help is honored at the top level (gws --help), at the bare-subcommand level (gws auth), and on helper commands
(gws +triage --help) — but not on any of auth login, auth setup, auth status, auth export, auth logout. The
argument parser appears to be skipped or short-circuited for the auth methods specifically.
Why this matters
gws auth login --helpis a natural thing for a user to type while exploring the CLI. Today it has the side effect of
starting an OAuth flow that binds a localhost port, opens a browser tab in some configurations, and may overwrite saved
credentials when completed. That's a footgun.gws auth setup --helpsimilarly starts the real interactive setup wizard, including gcloud probing. A user trying to
learn what flagssetupaccepts ends up walking through actual setup.- The inconsistency with the rest of the CLI (
--helpworks everywhere else) is a usability bug regardless of the side
effects.
Suggested fix
Have gws auth <method> route through the same argument parser the other subcommands use, so --help/-h short-circuits
before any side effect. The output of gws auth (the bare subcommand) is already a good template for what gws auth login --help should print.
Environment
@googleworkspace/cli0.18.1- macOS 26.4.1 (Darwin 25.4.0), Node 24.14.0
- Lenguaje dominante
- Rust
- Estrellas
- 32.3k
- Forks
- 2k
- Merge medio
- 16 h 3 min
- PR fusionados (30 d)
- 1
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de googleworkspace/cli
-
`gws auth login` keeps the old token cache, so API calls use a token from the previous grantAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
googleworkspace/cli#984 ·
Los mantenedores suelen responder en 1 día
-
auth export masks secrets by default with no warning; consumers fail later with invalid_clientAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
googleworkspace/cli#983 ·
Los mantenedores suelen responder en 1 día
-
Replace gemini with agyAbierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
googleworkspace/cli#958 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
googleworkspace/cli#921 ·
Los mantenedores suelen responder en 1 día
-
Add cli to awesome-ai-plugins?Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
googleworkspace/cli#920 ·
Los mantenedores suelen responder en 1 día
Todos los issues de googleworkspace/cli
Issues similares
-
area:cli area:security bug priority:medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
rtk-ai/rtk#5127 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
status: new topic: ga4gh-sdk type: bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
comp-rbac
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
ClickHouse/ClickHouse#131875 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
bug(python): read_transaction raises TypeError on a Rewrite with rewritten indicesPosiblemente ocupada @Borg93 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
lance-format/lance#11117 ·
Los mantenedores suelen responder en 2 días