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

Proposal: Populate Token.ExpiresIn when converting from internal.Token #746

Open
soh335 opened this issue Oct 18, 2024 · 0 comments
Open

Comments

@soh335
Copy link

soh335 commented Oct 18, 2024

The Token.ExpiresIn field was added in golang/go#61417. However, when retrieving a Token via methods like Config.Exchange, even though the server may return an expires_in value, only the Token.Expiry field is updated, and the Token.ExpiresIn field remains unset.

While Token.Expiry is generally sufficient, it seems confusing to have an ExpiresIn field present but left as a zero value. What do you think about populating the Token.ExpiresIn field when converting from internal.Token to Token?

#748

Alternatively, how about clarifying in the documentation for the ExpiresIn field that methods like Config.Exchange within the oauth2 package do not populate the Token.ExpiresIn field?

#747

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

No branches or pull requests

1 participant