Reputation: 616
I am using meteor user accounts for login . Now I have customized login forms and used their methods to login. Now i want to add remember me check box. If its not selected user should be logged out. Otherwise he can resume his session unless he manually log out. Any idea or concept what ever you can provide would be appreciated.
Upvotes: 5
Views: 498
Reputation: 3276
Can not test this at the moment, but you could use onbeforeunload
or onunload
events, and process the logout in that step
window.onbeforeunload = function () {
Meteor.logout();
};
Upvotes: 1