When I authenticate using this library for the first time to get refreshToken, my
'grantType' parameter in \Upwork\API\Config constructor is ignored unless I also specify 'expiresIn' parameter.
But since I don't yet have any tokens, I had to pass some random date in the past to overcome this issue.
When I authenticate using this library for the first time to get refreshToken, my 'grantType' parameter in \Upwork\API\Config constructor is ignored unless I also specify 'expiresIn' parameter. But since I don't yet have any tokens, I had to pass some random date in the past to overcome this issue.
I think there is an error in the library code, and line https://github.com/upwork/php-upwork-oauth2/blob/6f80eed2ee7da340f59d31c2a4188696267fd026/src/Upwork/API/Client.php#L64C11-L64C11 should be
!$grantType|| $this->_server->option('grantType', $grantType);
That way 'grantType' option won't depend on presence of 'expiresIn'.