Skip to content

Conversation

@zeroasterisk
Copy link
Contributor

I required this to make it work
application_default_credentials, _ = google.auth.default()

I required this to make it work
application_default_credentials, _ = google.auth.default()
@koverholt
Copy link
Collaborator

We actually just changed this in #825 to do the inverse since this pattern of using google.auth.default() within the tool couples the auth lifecycle to the agent's tool lifecycle and leads to unexpected token expirations. Using the currently documented approach, did you obtain ADC before running the code sample?

Pinging @slilichenko for guidance / clarification on this PR.

@slilichenko
Copy link
Contributor

The code sample you provided has a subtle bug. It works for a short period of time, and then the auth token will expire and the calls will start failing. Not providing the credentials at all will cause the BigQuery API to fall back on getting the credentials using ADC every time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants