Closed jburgoyn closed 4 years ago
Not sure 100%, but check the size of encrypted data, it's possible that it's more than DB limit.
Can you post the results of DESCRIBE quickbooks_oauthv2
? And confirm that these two fields are TEXT
type?
oauth_access_token
oauth_refresh_token
@consolibyte thanks, here is the results of the DESCRIBE. the tokens are indeed TEXT type.
Anything else you can think of to check?
Thanks, Jonny
@ebogdanov hi, could you expound on your suggestion of checking the size of the encrypted data? Could you provide some pointers for where I could look or what I might need to change. Thanks.
@jburgoyn Well, if you've TEXT as datatype, it's hard to guess now.
I've checked current "master" code and do not see any possible problems. My only one idea is that yours encryption key is some UTF-8 string?
If you use PHP 7.1+ I suggest you to check my fork with branch https://github.com/ebogdanov/quickbooks-php/tree/encryption/mcrypt-to-openssl
and see if problem still happens for you. If yes - there is only one way is step by step debugging of "refresh key workflow" on your system.
@ebogdanov thank you for the help, I will check out your branch for sure. Appreciate it.
I have the latest commits from last week or so. After an hour of being connected via OAuth2, and another QuickBooks API call is made, the auth token is invalid, the auth token is not being refreshed. We are getting the following errors when the token refresh is attempted.
PHP Notice: unserialize(): Error at offset 0 of 904 bytes in /lib/QuickBooks/QuickBooks/Encryption/Aes.php on line 82 PHP Warning: current() expects parameter 1 to be array, boolean given in /lib/QuickBooks/QuickBooks/Encryption/Aes.php on line 83
Any help would be greatly appreciated. Thanks.