title: What is the core functionality of the 'secret' option in express-session?
body: <p>I am trying to understand the functionality and relevance of the 'secret' option in express-session.</p>
  
  <p>I have already tried browsing online for some information regarding this, but couldn't find anything substantial.</p>
  
  <p>This is what I found on the npm express-session package page:
  secret</p>
  
  <p>Required option</p>
  
  <p>This is the secret used to sign the session ID cookie. This can be either a string for a single secret, or an array of multiple secrets. If an array of secrets is provided, only the first element will be used to sign the session ID cookie, while all the elements will be considered when verifying the signature in requests.</p>
  
  <p>I don't understand how exactly does secret accomplish signing the session ID cookie. How exactly is this required feature implemented behind the scenes?</p>