tuya-iot-python-sdk icon indicating copy to clipboard operation
tuya-iot-python-sdk copied to clipboard

Fix refreshing of the credentials in case the refresh token is expired

Open azerty9971 opened this issue 5 months ago • 0 comments

If the call to refresh the access token fails because the token is expired then the result of the new connect (which is a new refresh token and a new access token) should be stored in the TuyaTokenInfo that is created in the __refresh_access_token_if_need (line 168).

Without this code, the returned payload is the error one (code 1010) and is thus stored in the TuyaTokenInfo instead of the newly retrieved credentials.

azerty9971 avatar Aug 29 '24 13:08 azerty9971