Fix incorrect isValidToken comparison between seconds and milliseconds #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use this template to give context and details about what your changes bring to the project. You should complete as many sections as possible, deleting those that are not relevant.
Ticket 🎟
[XXX-xxx]
What⁉️
What are these changes? Please include screenshots for UI changes

Fix error in isValidToken logic, both issued_at and expires_in are in seconds but compares to Date.getTime() which returns milliseconds
Why⁉️
Why are these changes necessary?
Current isValidToken function causes a new token to be requested for each call.
Can result in 500 responses from API if too many requests per second
How⁉️
How have you approached making these changes?
Divide Date.getTime() by 1000 to get seconds, and rename variables to understand what time interval the expiry is defined in
How to review and test 📱
Please provide details on how the reviewer should review your changes and the best way for them to test them.
Run two subsequent requests with API, should reuse the same token.
Checklist ✅