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

oauth: handle a string expires_in value gracefully #181

Merged
merged 1 commit into from
Sep 10, 2024
Merged

Conversation

mikix
Copy link
Contributor

@mikix mikix commented Sep 10, 2024

If an OAuth token's expires_in field is a string instead of an int, simply try to convert it to an int first.

Fixes #179

If an OAuth token's expires_in field is a string instead of an int,
simply try to convert it to an int first.

Fixes #179
Copy link
Contributor

@dogversioning dogversioning left a comment

Choose a reason for hiding this comment

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

do we want to mark this as a potential thing to have toggleable via a 'strict' mode flag in the future?

@mikix
Copy link
Contributor Author

mikix commented Sep 10, 2024

do we want to mark this as a potential thing to have toggleable via a 'strict' mode flag in the future?

Is it useful to be strict here? "Loose consumers, strict producers" is my default vibe.

@mikix mikix merged commit 63b4081 into main Sep 10, 2024
5 checks passed
@mikix mikix deleted the mikix/str-expires-in branch September 10, 2024 14:27
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.

handle_callback fails in _request_access_token when expires_at type is str
2 participants