Suppose I need two different passports within one express application (e.g. user & room). So I define two separate vars:
var passport = require(\'pass
The problem your having is that the passport module exports an instantiated Passport object when you require it. And because that object is cached by node when you require it, you get the exact same object every time.
Luckily, the passport module also gives you a reference to the class, meaning you can do this.
var Passport = require('passport').Passport,
passport = new Passport(),
roomPassport = new Passport();
Now you should have two completely separate passport objects.