Setting the Meteor.loginTokenExpires on Login

Is it possible to set the Meteor.loginTokenExpires for an individual user on login? Accounts.config loginExpirationInDayo sets expiration globally for all users.

A hack can be to monitor this on the client and then manually log them out clientside. I’m doing something similar for a 20min idle timeout

Thanks. I just don’t understand why setting the loginTokenExpires is not part of the Accounts packages. They go to all the trouble of providing all this basic functionality and leave out one of the most basic items that is on every web app??

One more way to handle this - write your own login handler using Accounts.registerLoginHandler, and manipulate a users stored services.resume.loginTokens “when” (expiry) value yourself. This sounds worse than it really is - check out the last code sample in the following post for something similar - Extending Meteor Accounts.

(Funny thing is I just linked to the Extending Meteor Accounts article in response to another post - definitely some happening here …)

P.S. --> If you’re just looking for stale session / session timeout handling, try zuuk:stale-session.