Skip to content

Add -google-adc flag for Application Default Credentials#43

Open
graphaelli wants to merge 1 commit into
mainfrom
google-adc-auth
Open

Add -google-adc flag for Application Default Credentials#43
graphaelli wants to merge 1 commit into
mainfrom
google-adc-auth

Conversation

@graphaelli

Copy link
Copy Markdown
Owner

Support authenticating to Google with Application Default Credentials (GOOGLE_APPLICATION_CREDENTIALS, gcloud user creds, or the GCP metadata server) as an alternative to the interactive OAuth flow and google.config.json/google.creds.json files.

  • google: add NewClientFromADC and a tokenSource path through HasCreds, Service, and the OAuth web handlers (which become no-ops in ADC mode)
  • main: add -google-adc flag selecting the constructor
  • README: document the flag and credential discovery order

closes #42

Support authenticating to Google with Application Default Credentials
(GOOGLE_APPLICATION_CREDENTIALS, gcloud user creds, or the GCP metadata
server) as an alternative to the interactive OAuth flow and
google.config.json/google.creds.json files.

- google: add NewClientFromADC and a tokenSource path through HasCreds,
  Service, and the OAuth web handlers (which become no-ops in ADC mode)
- main: add -google-adc flag selecting the constructor
- README: document the flag and credential discovery order

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Google Application Default Credentials

1 participant