I am using Passport for authentication in my app, and I am also using Express. To summarize my issue: my login functionality works fine initially, but after any<
Set cookie name to value, where which may be a string or object converted to JSON. The path option defaults to "/".
res.cookie('rememberme', '1', { expires: new Date(Date.now() + 900000), httpOnly: true });
The maxAge option is a convenience option for setting "expires" relative to the current time in milliseconds. The following is equivalent to the previous example.
res.cookie('rememberme', '1', { maxAge: 900000, httpOnly: true })
Also the Link
http://expressjs.com/api.html#res.cookie