tuya-iot-python-sdk
tuya-iot-python-sdk copied to clipboard
Token is never refreshed
https://github.com/tuya/tuya-iot-python-sdk/blob/83f1e999d75ef87b2170ffbbb239ca8651dab0c3/tuya_iot/openapi.py#L144
But is_connect()
never check if the token is expired.
Besides, this bug needs more than a one-line fix. You have another hidden problem in your code:
__request() => __refresh_access_token_if_need() => post() => __request() => __refresh_access_token_if_need()
Currently the loop breaks because of is_connect() == True
. However, you should be aware that once you fix the bug mentioned above, you must also check whether path.startswith(TO_C_REFRESH_TOKEN_API)
.
Any update on that ?
Any update on that ?
No, there are several pull requests that would solve this issue, however, any of developers won't even reject them.