timeoutIn method
Returns the how long until timeout in milliseconds
Implementation
int timeoutIn(User user) {
if (activityTimestamp == -1) {
return -1;
}
final now = DateTime.now().millisecondsSinceEpoch;
final timestamp = activityTimestamp == -1 ? now : activityTimestamp;
if (user.rememberFor24h) {
return (_timeout24h - (now - timestamp));
} else {
// default session timeout is 15m
return (_timeout15m - (now - timestamp));
}
}