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

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -