Skip to content

Commit

Permalink
Merge pull request #79 from buzzub/custom-session-length
Browse files Browse the repository at this point in the history
Allow the session expiration length to be configurable
  • Loading branch information
nialldonnellyfh committed Jun 13, 2017
2 parents 50a9e77 + 80db4f5 commit 5f91ca1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/mbaas/session/mongoProvider.js
Expand Up @@ -7,7 +7,10 @@ module.exports = {
if (err) {
return cb(err);
}
self.store = new MongoStore({db: mongo});
self.store = new MongoStore({
db: mongo,
ttl: expressConfig.config.ttl || 14 * 24 * 60 * 60 // = 14 days. Default
});
self.db = mongo;
return cb(null);
});
Expand Down

0 comments on commit 5f91ca1

Please sign in to comment.