title: Is secret set in cookie parser and session store the same thing in express.js?
body: <p>The authentication example provided by <code>Node.js</code> uses the following piece of code:</p>
  
  <pre><code>app.use(express.cookieParser('shhhh, very secret'));
  app.use(express.session());
  </code></pre>
  
  <p>However, the <a href="https://github.com/expressjs/session" rel="nofollow">documentation</a> of <code>express.js</code> session uses the following:</p>
  
  <pre><code>app.use(cookieParser())
  app.use(session({ secret: 'keyboard cat', key: 'sid', cookie: { secure: true }}))
  </code></pre>
  
  <p>This is confusing. Are both secrets the same? Which method should I use if I store my sessions in a database?</p>