Hi, I noticed a critical issue using this module.

In the getTokensFromJSON we have this lines:
$oAuthTokens->setExpiryTime($oAuthTokens->getCurrentTimeInMillis() + $expiresIn);

and expiresIn may be in seconds, not milliseconds. As result - token is created already expired.
It works for some time (it is refreshing token on each request) but on some point it reaches the refreshing limit.
It may be not noticed if you use zoho connection less than refresh limits.

It was fixed in 2.0.6

Compare this:
https://github.com/zoho/zcrm-php-sdk/blob/2.0.1/src/oauth/ZohoOAuthClien...

And this:
https://github.com/zoho/zcrm-php-sdk/blob/2.0.6/src/oauth/ZohoOAuthClien...

So there is no sense using version lover than 2.0.6 otherwise you may face a same issue.

Comments

gilmord created an issue. See original summary.

gilmord’s picture

gilmord’s picture

Status: Needs review » Closed (duplicate)