Skip to content

Commit

Permalink
Use the *express* native rolling instead (#1245)
Browse files Browse the repository at this point in the history
* Alternative is "Remember me" option although I think I'd rather have a "Forget me" option by default.

Post #1202 and related to #604

Auto-merge
  • Loading branch information
Martii authored Nov 9, 2017
1 parent 12e4b76 commit 4418c93
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions app.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ app.use(session({
cookie: {
maxAge: 4 * 60 * 60 * 1000 // 4 hours in ms
},
rolling: true,
secret: sessionSecret,
store: sessionStore
}));
Expand All @@ -306,14 +307,6 @@ app.use(function (aReq, aRes, aNext) {
});
app.use(modifySessions.init(sessionStore));

// Rolling user session
app.use(function (aReq, aRes, aNext) {
if (aReq.session.user) {
aReq.session.user._touched = new Date();
}
aNext();
});

app.use(favicon(__dirname + '/public/images/favicon.ico'));

// Set up the views
Expand Down

0 comments on commit 4418c93

Please sign in to comment.