title: Node.js cookies and session management
body: <p>After surfing the web about cookies and session I am creating a simple login in nodejs using express with cookie/session using redis as my data storage. </p>
  
  <p>What do you think is the best way to handle cookies/session after the user logs in? I also have these question in my mind:</p>
  
  <ol>
  <li>How do i prevent using userA cookie to inject to userB's browser? </li>
  <li>Do I need to check the value of the cookies before performing any process?</li>
  <li>Using <code>cookieParser</code> is it safe that the connect.sid is unique in every browser?</li>
  <li><code>app.use(session({secret: 'secretkey', key: 'quser'}));</code> what is this <code>secret</code> all about?</li>
  </ol>
  
  <p>I can't make up my mind on how i'm gonna use them in a proper way. Thanks guys.</p>