CityWebConsultants / Iris

Modular content management and web application framework built with Node.js and MongoDB
http://irisjs.org
Other
9 stars 7 forks source link

Replace cookies/session module with Express-session #360

Closed FilipNest closed 7 years ago

FilipNest commented 7 years ago

As different sites may want different session config for now I've made a config parameter called expressSessionsConfig that you can pass in to overwrite the default.

Any suggestions as to what the default session config should be? Cookie lifetime etc. Open to any ideas.

I put the following but it's probably improvable before this gets merged in:

{
secret: crypto.randomBytes(8).toString('hex'),
resave: false,
saveUninitialized: true,
};