passport.js passport.initialize() middleware not in use
Follow the example to avoid the out-of-order middleware hell that express makes it so easy to enter. Straight from the docs. Note how yours does not match this exactly. Docs cookieParser session passport.initialize passport.session app.router You passport.initialize passport.session cookieParser session app.router