Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: remove token_info call from token refresh path #1595

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

sai-sunder-s
Copy link
Contributor

A call to token_info endpoint is being made in critical path when refreshing access tokens. Removing that call and instead going to provide the account from user credential file.

@sai-sunder-s sai-sunder-s requested review from a team as code owners September 16, 2024 20:17
@clundin25
Copy link
Contributor

@sai-sunder-s could we leave this in as a fallback? I am worried this will break certain use cases.

@@ -351,33 +350,6 @@ def with_universe_domain(self, universe_domain):
def _metric_header_for_usage(self):
return metrics.CRED_TYPE_USER

def _set_account_from_access_token(self, request):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you alternatively perform this in the account property in case _account is not already set?

@sai-sunder-s
Copy link
Contributor Author

@sai-sunder-s could we leave this in as a fallback? I am worried this will break certain use cases.

The code I am removing is not released yet. It was added in https://github.com/googleapis/google-auth-library-python/pull/1587/files#diff-1642b863da79afb2c93ba8091f011e12d0c9d50eca6b89ea5ac7e9509bf51647

@sai-sunder-s sai-sunder-s merged commit afb9e5a into main Sep 16, 2024
16 checks passed
@sai-sunder-s sai-sunder-s deleted the errormsg branch September 16, 2024 22:35
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.

2 participants