How my Application works.
I am refreshing the token every 10 minutes from identity server using Iframe. I am using ngIdle in my application to track the idleness of a User.
Call the refresh every 10 minutes
setInterval(() =>{
this.refreshToken();
},100000);
Calling the URL using Iframe
refreshToken(){
let iframe =document.createElement('iframe');
iframe.id ="refreshToken";
iframe.setAttribute('src',"/connect/tokenclient_id=client1& client_secret=secret&grant_type=authorization_code&code=hdh922&redirect_uri=https://myapp.com/callback");
document.body.appendChild(iframe)
}
If a user is Idle meanwhile silentrefresh gets called ,the idle time of the user gets interrupted and restarts.
I have tried hitting some other URLS from the iframe,but that didn't interrupt the idleness.It is happening only in identity server case