Refresh token is not working as I expected in adal.js(@types - 1.0.8), When user is idle on screen for last 15 minutes (because I refresh token before 15 minutes of expiry of old token), and after that perform action, then my service call fail. because it gets old token(which expire) in header, but token refresh is also done after that. how I can handle this in angularJS and adal library? I used below code to get refresh token
this.authenticationContext.getCachedUser();
this.authenticationContext.acquireToken(config.clientId, function (errorDesc, token) {
if (errorDesc) {
console.log("ErrorDesc", errorDesc);
}
if (token) {
console.log("calling the Web API with the access token", token);
}
});
in angular.