I have on premise SharePoint 2016 farm connected to ADFS 4.0. So there is a federated security setup. ADFS with IDP issues SAML1.1 Token with 60 minutes lifetime. Then in SharePoint I have 20 minutes LogonTokenCacheExpirationWindow. That means, session lifetime is 40 minutes. It's all clear here.
SSO token lifetime is 480 minutes on ADFS.
Right now when session expires (let's say it's 41 minute) - user can refresh the page, token is prolonged and he has next 40 minutes.
In OAuth2 where you have implicit grant and libs like ADAL.js. In case of my setup - tried iframe approach and sent request to custom aspx page using that iframe.
However, to force authentication flow - that page had to force user sign out, redirect and get user signed in. Only this allowed to update token in SPTokenCache and reissue fedauth cookie.
I'd like to understand whether there is any approach to do this in a background better than mine?
Thanks in advance.