I have a app that is hosted on Azure and uses Azure to handle login and creds etc. The app stays open and refreshes every 5 minutes. This works well for about 1.5 hours. Then when it does the usual auto refresh, no data gets returned. In dev tools, I can see that the request to the api returns a 200 but the expected payload is empty (during the refresh the page calls an internal API and returns data from a SQL db).
If I then hit F5, or click on any of the nav links, the site URL redirects to the microsoft login and then instantly redirects back to the page and everything works as expected. I dont have to enter creds again - it happens quickly.
I think there must be a token expiration issue maybe? It seems like the site needs to go and get new creds or set a new bearer token or something. We have the token expiration set for much longer.
how can I fix this issue, I would like the page to be able to stay 'live' for 10 hours.