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

Very short margin on OAuth token refresh #140

Open
vicdelfant opened this issue Aug 30, 2024 · 1 comment
Open

Very short margin on OAuth token refresh #140

vicdelfant opened this issue Aug 30, 2024 · 1 comment

Comments

@vicdelfant
Copy link

It seems that an access token is only refreshed if it actually expired already, or will expire within the next 1 second:

return (int) $this->expiresAt - time() < 1;

This seems to be a very short window given that there can easily be a time difference between systems. Is there a specific reason that this was set to such a short timeframe, or would it be okay to submit a PR to change it to a minute? With the access tokens being valid for 1 hour, that's still plenty of margin.

@vicdelfant vicdelfant changed the title Very short margin on refresh Very short margin on OAuth token refresh Aug 30, 2024
@IsraelOrtuno
Copy link
Owner

Changing it to a minute would make sense to me, happy to submit a PR?

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

2 participants