title: How to make session last maximum of 30 days using client-sessions duration and activeDuration
body: <p>According to <a href="https://github.com/mozilla/node-client-sessions#usage" rel="noreferrer">https://github.com/mozilla/node-client-sessions#usage</a></p>
  
  <pre><code>var sessions = require("client-sessions");
  app.use(sessions({
    cookieName: 'mySession', // cookie name dictates the key name added to the request object
    secret: 'blargadeeblargblarg', // should be a large unguessable string
    duration: 24 * 60 * 60 * 1000, // how long the session will stay valid in ms
    activeDuration: 1000 * 60 * 5 // if expiresIn &lt; activeDuration, the session will be extended by activeDuration milliseconds
  }));
  </code></pre>
  
  <p>I want my users' sessions to be active for a maximum of 30 days. If I set <code>duration</code> to 30 days and <code>activeDuration</code> to 30 days, I think I'll end up with 60 day long sessions.</p>
  
  <p>If I set <code>duration</code> to 15 days and <code>activeDuration</code> to 15 days, won't a user who logs in and then does nothing at all be logged out in 15 days (not that I expect that kind of user behavior, but is my assumption correct?)</p>
  
  <p><strong>All I want is for every time a user comes to the site to get 30 days before they need to re-login. How do I get that behavior?</strong></p>