title: How to implement server side sessions in node.js with express for an android app?
body: <p>Hello all i am making an android app in whiich i have multiple account login at a time now my question is that i for multiple logins i should use sessions to verify every account user that is logged in. Now i am using express on the server side i have read a lot of documentation on storing sessions in node.js</p>
  
  <ol>
  <li>Express-session (Though it is only good for development but not for production but not for my app)</li>
  <li>Cookie-session</li>
  <li>connect-Redis</li>
  <li>connect-mongo</li>
  </ol>
  
  <p>I have also heard about json web tokens where i can generate unique tokens and then i can pass the tokens to the client using res.json({user_id:"user1", token: "generated_token here"})
  I have also heard about passport but dont know how it is going to do this <strong>also as in passport i use express-session by default will it be good for production or not ??</strong></p>
  
  <p>Now my first question is i have read all of there docs and nowhere it is mentioned where i am creating unique tokens for every user that is signing up.
  Second question as i am using my server for android app there will be no use of cookie i will be sending user token as in parameter req.body.token now how to cmpare this with current user_id.</p>
  
  <p>Actually i dont get the flow of control i mean how everything is going on in session in node.js. Also what is this secret is this thing generating unique tokens or what. Also i mean about 100000 of users are registered for my app now please tell me accordingly which way should i use for my app.</p>
  
  <p>I have asked this question previously but there i did not mention that as i am not making a website how to do this(As in my case there will be no use of tokens) </p>
  
  <p><strong>I know this question i am asking is very vague but please bear with me i just want to understand how sessions are used in node.js</strong> </p>
  
  <p>Thanks Anways</p>