function userReauthentication(clientToken, callback) {
  async.waterfall([
    function(next) {
      Session.findUser(clientToken, next);
    }, function(userId, next) {
      Session.create(userId, next);
    }, function(session, next) {
      Session.destroy(clientToken, function(err) {
        if (err) {
          next(err);
        } else {
          next(null, session);
        }
      });
    }
  ], callback);
}
// Takes a token string, deletes found session and creates a new one
Takes a token string, deletes found session and creates a new one
Takes a token string deletes found session and creates a new one
function userReauthentication(clientToken, callback) {
  async.waterfall([
    function(next) {
      Session.findUser(clientToken, next);
    }, function(userId, next) {
      Session.create(userId, next);
    }, function(session, next) {
      Session.destroy(clientToken, function(err) {
        if (err) {
          next(err);
        } else {
          next(null, session);
        }
      });
    }
  ], callback);
}
function userReauthentication ( clientToken , callback ) { async . waterfall ( [ function ( next ) { Session . findUser ( clientToken , next ) ; } , function ( userId , next ) { Session . create ( userId , next ) ; } , function ( session , next ) { Session . destroy ( clientToken , function ( err ) { if ( err ) { next ( err ) ; } else { next ( null , session ) ; } } ) ; } ] , callback ) ; }
Takes a token string, deletes found session and creates a new one
Takes a token string deletes found session and creates a new one