Skip to content

Commit

Permalink
fix(translate-v2): Ensure access token is fetched with recent googlea…
Browse files Browse the repository at this point in the history
…uth versions in the non-api-key case
  • Loading branch information
dazuma committed Dec 11, 2024
1 parent 5494628 commit 00e3e36
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def sign_http_request! request
client = credentials.client
return if client.nil?

client.fetch_access_token! if client.expires_within? 30
client.fetch_access_token! if client.access_token.nil? || client.expires_within?(30)
client.generate_authenticated_request request: request
request
end
Expand Down

0 comments on commit 00e3e36

Please sign in to comment.