meteorhacks / picker

Server Side Router for Meteor
MIT License
182 stars 30 forks source link

Use express-session as middleware? #32

Open Jehu opened 8 years ago

Jehu commented 8 years ago

Would be nice if we could use express-session. I've created a custom package to load the npm module 'express-session'.

My package code is like this:

ServerSession = Npm.require('express-session');
ServerSession({
  secret: "mySecret",
  resave: false,
  saveUninitialized: true
});

... and in the Package.onUse() an api.export('ServerSession'); call exists.

But as soon as i try to use Picker.middleware(ServerSession); in my code, i get the errors below:

W20151227-19:33:50.933(1)? (STDERR) Sun, 27 Dec 2015 18:33:50 GMT express-session deprecated undefined resave option; provide resave option at packages/meteorhacks_picker.js:138:16
W20151227-19:33:50.933(1)? (STDERR) Sun, 27 Dec 2015 18:33:50 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at packages/meteorhacks_picker.js:138:16
W20151227-19:33:50.934(1)? (STDERR) Sun, 27 Dec 2015 18:33:50 GMT express-session deprecated req.secret; provide secret option at packages/meteorhacks_picker.js:138:16

Any ideas?