我在尝试这里描述的工作
https://github.com/jaredhanson/passport/issues/14
app.use(passport.initialize());
app.use(passport.session());
app.use(app.router);
app.use(express.static(__dirname + /public ));
工作报酬
app.use(app.router);
app.use(express.static(__dirname + /public ));
app.use(passport.initialize());
app.use(passport.session());
gives
DEBUG: Error: passport.initialize() middleware not in use
at IncomingMessage.<anonymous> (/.../node_modules/passport/lib/passport/http/request.js:30:30)
at Context.<anonymous> (/.../node_modules/passport/lib/passport/middleware/authenticate.js:92:11)
at Context.<anonymous> (/.../core/node_modules/passport/lib/passport/context/http/actions.js:21:25)
at Strategy.success (native)