I am building an aurelia app using adal JS for authentication. After 1-hour token gets expired and after that not API is called. I think the problem is in renewing the token. I set the interval of 5 minutes to check the validity of token. I am using handleWindowCallback when I get the token initially.
window.setInterval(function(){
self.authorizeStep.authContext.adal.acquireToken(self.authorizeStep.authContext.adal.config.clientId, (x)=> {
console.log('acquiretoken callback hit!') })
self.authorizeStep.authContext.adal.handleWindowCallback();
},50*1000)
These line of code are used in app.js. It throws the 401 unauthorised access. These are the image of error.