1

When I open up a browser #1 and log in to our app and then open browser #2 and log in to our app, the first browser log in session closes. I am accomplishing this by calling Meteor.logoutOtherClients().

However, I notice that in browser #1, the Meteor.userId() still exists with an id even after logout from server side. How can I clear this? I no longer would like an id to exist in browser #1

Amit kumar
  • 6,029
  • 6
  • 30
  • 40
jeffci
  • 2,537
  • 6
  • 37
  • 59
  • This should not happen. How do you know that #1 browser session is closed? – kkkkkkk Jan 27 '17 at 04:49
  • logoutOtherClients logs out all but the current/new login – jeffci Jan 27 '17 at 05:11
  • Meteor.logoutOtherClients() will log you out from server. in client side you should use guards or resolves for component access. for login use Meteor.user() in place of Meteor.userId(). Meteor.userId() check in localstorage but Meteor.user() you will get from server side. hope this help :) – Amit kumar Jan 27 '17 at 05:35
  • @Amitkumar, both Meteor.user() and Meteor.userId() continue to resolve :-( – pcormier Oct 21 '18 at 19:39
  • They do resolve and the scary part is the token still lives... this should be considered a security related issue imho. We've moved our app away from Meteor since I asked this question. – jeffci Oct 22 '18 at 16:01

0 Answers0