pipedrive icon indicating copy to clipboard operation
pipedrive copied to clipboard

Very short margin on OAuth token refresh

Open vicdelfant opened this issue 1 year ago • 1 comments

It seems that an access token is only refreshed if it actually expired already, or will expire within the next 1 second: https://github.com/IsraelOrtuno/pipedrive/blob/cc5fee011ef4e836ce60aa97d2a8a51c9645a633/src/PipedriveToken.php#L125

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 avatar Aug 30 '24 07:08 vicdelfant

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

IsraelOrtuno avatar Nov 10 '24 18:11 IsraelOrtuno