title: multiple sessions in passport.js
body: <p>middieware setup </p>
  
  <pre><code>var session = require('express-session');
  var passport = require('passport');
  app.use(session({
  secret: 'secret',
  saveUninitialized: true,
  resave: true
  }));
  app.use(passport.initialize());
  app.use(passport.session());
  </code></pre>
  
  <p>i have two seperate users to login. one is customer and another one is merchent</p>
  
  <p>customer passport session code</p>
  
  <pre><code>var passport = require('passport');
  var Strategy = require('passport-local').Strategy;
  app.post('/login',
  passport.authenticate('local', {successRedirect:'/customer/home',    failureRedirect:'/customer/login',failureFlash: true}),
  function(req, res) {
    req.session.user=user;
    res.redirect('/customer/home');
  });
  passport.serializeUser(function(user, cb) {
  cb(null, user._id);
  });
  
  passport.deserializeUser(function(id, cb) {
  data.customerid(id, function (err, user) {
    if (err) { return cb(err); }
    cb(null, user);
  });
  });
  
  passport.use(new Strategy(
  function(username, password, cb) {
    data.customerlogin(username, function(err, user) {
      if (err) { 
          return cb(err); 
      }
      if (!user) {
           return cb(null, false); 
          }
      if (user.password != password) { 
          return cb(null, false); 
      }
      return cb(null, user);
  });
  }));
  </code></pre>
  
  <p>it is working for one user how to create another session for merchent who is a another user</p>