Repository navigation
--auth default is documented as adc but defaults to oauth2 — and the ADC recommendation should stay
#127
crichalchemist
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Two related but separate things in the auth docs, posting here per CONTRIBUTING.md.
1. The documented default is wrong
src/colab_cli/cli.py:78sets the flag default:and the installed CLI agrees — from
colab --helpon 0.6.0 (PyPI latest):Two docs state the opposite:
README.md:108— "--auth {oauth2,adc}— Authentication strategy for the Colab API (default:adc)."skills/colab-operator/SKILL.md:29— "The global flag is--auth={adc,oauth2}and the default isadc(Application Default Credentials)."SKILL.md is the bundled agent skill shipped through
colab skill, so this one has teeth: an agent that reads it will omit--auth=adcbelieving it is redundant and silently take the oauth2 path instead. That is the opposite of what the same document recommends two paragraphs later.2. The recommendation to prefer ADC should stay — #116 is the reason
Flagging this because the obvious correction — rewrite the docs so oauth2 reads as the primary path, since it is the default — would point agents at the path that is currently broken for a supported user choice.
Per #116, if a user approves only some of the six requested scopes on Google's granular consent screen:
~/.config/colab-cli/token.jsonis never written;invalid_scopeand falls back to a fresh browser consent, in practice about hourly.ADC does not have this problem:
google/auth/_default.pyloads credentials without forcing a scope list, whereasauth.pycallsCredentials.from_authorized_user_file(TOKEN_CONFIG_PATH, PUBLIC_SCOPES)with an explicit one, andfrom_authorized_user_infoonly honors the scopes stored in the file when the caller passesNone.I hit this directly on macOS with 0.6.0: oauth2 did not work until I deleted the cached credentials and switched to
--auth=adc, which has been stable since.So the two statements that belong in the docs are different from each other:
oauth2--auth=adc, especially for unattended and agent use, while [Bug]: Partial (granular) consent breaks login and then forces a browser re-login every hour on --auth=oauth2 #116 is openToday the docs get the first one wrong and the second one right, and it would be easy to "fix" them into getting the first right and the second wrong.
Prior art
#68 reported the same doc drift and #69 fixed it; both were closed on 2026-06-18 as
NOT_PLANNED, directing external feedback here — hence this post rather than a patch.Worth noting that this is not quite a re-run of #69. That PR, as written, would have updated SKILL.md to describe the OAuth2 remote copy-paste flow as the primary flow with "ADC as an explicit option." Given #116, that is the opposite of the guidance that seems right now.
No patch proposed — flagging per the contribution guidelines. Happy to supply the exact wording for either file if that is useful.
All reactions