javascript - Other browser windows don't go back to user login page after Meteor.logout() -


i have written meteor application user login. after user logs out, application redirects user login page. however, when multiple tabs in browser (or multiple browser windows) application active (and user logged in), active tab or browser window goes user login page. in other window seems user still logged in. however, when user further work in other window, nothing synced db on server anymore. thought meteor.logout() reactive, how possible other browser tabs or windows don't refresh?

i have folowwing in router?js file:

var filters = {  isloggedin : function(pause) {   if(!meteor.user()){    this.render('login');   } else {    this.next();   }  }  ....  }  router.onbeforeaction(filters.isloggedin); 

after pushing logout button following js code executed

meteor.logout(); 

thanks help.

try this:

meteor.logoutotherclients 

meteor.logoutotherclients should log out sessions. designed situations user logged in on multiple devices , wants log out on of them simultaneously.


Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -