I'm trying to mimic a periodic token refresh. We have javascript code in our frontend that periodically checks if a token refresh needs to occur, and if so, issues a call to refresh the token. This is ran every couple minutes or so as long as anyone is using the application.
The typical user of our application will leave the app open without doing anything on it for time greater than the token lifetime. So I can't simply check and perform a token refresh on each call without adjusting the script to not mimic real life usage (because calls would need to occur more frequently).
Any ideas if, or how, this could be possible?