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

runtime api calculating token expiration incorrectly #341

Closed
mbthornton-lbl opened this issue Jan 8, 2025 · 0 comments · Fixed by #342
Closed

runtime api calculating token expiration incorrectly #341

mbthornton-lbl opened this issue Jan 8, 2025 · 0 comments · Fixed by #342
Assignees

Comments

@mbthornton-lbl
Copy link
Contributor

mbthornton-lbl commented Jan 8, 2025

goal: If token expires in 60 seconds or less, refresh

wrong - this hits the token endpoint anytime the api is called:
if not self.token or self.expires_at + 60 > time():

Should be:
if not self.token or self.expires_at < time() - 60:

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

Successfully merging a pull request may close this issue.

1 participant