Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
return function(dispatch, getState) {
let sessionExpirationCheckIntervalId = getState().auth.sessionExpirationCheckIntervalId
log.debug(`Removing session expiration check interval, id: ${sessionExpirationCheckIntervalId}`)
try {
workerTimers.clearInterval(sessionExpirationCheckIntervalId)
} catch(err) {
console.log(`Failed to clear auth token timeout, id=${sessionExpirationCheckIntervalId}`)
console.log(err)
}
dispatch(removeSessionExpirationCheck())
}
}