Closed SecondThundeR closed 1 year ago
For now, I guess, this will probably fix this issue (Will be tested on next token expiration): https://github.com/SecondThundeR/shikithon/blob/738d97bf91951e4aea36927504e4b13cac5167d7/shikithon/base_client.py#L401-L414
Well, its better to move out this logic to own function (also, logic for updating is duplicated before response and after, when checking for code status): https://github.com/SecondThundeR/shikithon/blob/ec30392c4ba9991be22b1bd09d01fddf57a9bb04/shikithon/base_client.py#L562-L580
Latest changes works fine and tokens update successfully (Bugfix pushed to PyPI)
Currently, in 2.2.0 version there is a bug, when token cannot be refreshed because
Authorization
header is set.Obvious solution would be to implement a header cleanup when refreshing token