A
A
Alexey Yarkov2016-05-04 17:27:56
Node.js
Alexey Yarkov, 2016-05-04 17:27:56

Why does express session kill the session when the application is idle?

I use express-session in my app:

app.use(session({
  genid: function(req) {
    return uuid.v4();
  },
  saveUninitialized: false,
  resave: false,
  cookie: { 
    name: config.get('session_cookie_name'),
    maxAge:  (60*60*1000*24) // Сутки
  } , 
  key: config.get('session_cookie_name'),
  secret: config.get('session_cookie_secret'),
  proxy: true,
  store: MongoStore
}));

But once you open a tab and forget about it for half an hour, the session ends. How so?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
catHD, 2016-05-05
@yarkov

https://github.com/expressjs/session#resave

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question