I am trying to detect user inactivity and log out the user, below is relevant part of my code
JS Code
Session.inactivity().then(function() {