express session key property -


i try build app authentication system in express. keeping user on session, use express session middleware. when configure session, wonna know, if session key property have assign or not. sample book.

app.configure(function(){   app.sessionsecret = 'socialnet secret key';   app.set('view engine', 'jade');   app.use(express.static(__dirname + '/public'));   app.use(express.limit('1mb'));   app.use(express.bodyparser());   app.use(express.cookieparser());   app.use(express.session({     secret: app.sessionsecret,     key: 'express.sid',     store: app.sessionstore   }));   mongoose.connect(dbpath, function onmongooseerror(err) {     if (err) throw err;   }); }); 

and whats gonna happen, when don't assign value session key?

express.session uses connect.session underneath; if @ its documentation, use connect.sid default key in case don't provide 1 yourself:

options:

  • key cookie name defaulting connect.sid
  • ...

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -