Closed geogamba closed 5 months ago
Describe the bug The token expiration conversion of seconds to microseconds is incorrect. I've been having problems with tokens expiring too fast, and narrowed it down to this problem.
Currently on core.py line 2281
core.py
def expired(self) -> bool: """ """ return self.timestamp + (self.expires_in - TokenProvider. token_expire_threshold) * 1000 < int( time.time_ns() / 1000)
it should be
def expired(self) -> bool: """ """ return self.timestamp + (self.expires_in - TokenProvider. token_expire_threshold) * 1000000 < int( time.time_ns() / 1000)
This should convert seconds to microseconds to match the self.timestamp and the time.time_ns() / 1000 (nanosecond converted to microseconds)
self.timestamp
time.time_ns() / 1000
To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Client Information (please complete the following information):
Additional context Add any other context about the problem here.
Describe the bug The token expiration conversion of seconds to microseconds is incorrect. I've been having problems with tokens expiring too fast, and narrowed it down to this problem.
Currently on
core.py
line 2281it should be
This should convert seconds to microseconds to match the
self.timestamp
and thetime.time_ns() / 1000
(nanosecond converted to microseconds)To Reproduce Steps to reproduce the behavior:
Expected behavior A clear and concise description of what you expected to happen.
Screenshots If applicable, add screenshots to help explain your problem.
Client Information (please complete the following information):
Additional context Add any other context about the problem here.