User login is managed with JWT stored in localStorage for my Website.
And within login function, setTimeout function exists and it clears the localStorage, when token expiration time has come.
But It doesn't work when the device has been to sleep mode. When it awakes, the time of clearing localStorage has already passed and logout function is not being called as I expected.
So if there is some way to run the function that are queued with 'setTimeout()', I would like to call it when device is awake from sleep mode.
Is it possible to call the functions that already has passed the time of setTimeout?