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 defaultingconnect.sid
- ...
Comments
Post a Comment