From 55aeaadd615d7c2e377548d7c6c8f3ce5214afec Mon Sep 17 00:00:00 2001 From: Liran Tal Date: Sat, 18 Jan 2014 00:22:16 +0200 Subject: [PATCH] fixed defect where no flash (error/success) messages would be displayed due to wrongly placed flash() call (it should go after passport.initialize and passport.session) --- config/express.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/config/express.js b/config/express.js index 3db729e5..60f7a6db 100755 --- a/config/express.js +++ b/config/express.js @@ -56,9 +56,6 @@ module.exports = function(app, passport, db) { }) })); - // Connect flash for flash messages - app.use(flash()); - // Dynamic helpers app.use(helpers(config.app.name)); @@ -66,6 +63,9 @@ module.exports = function(app, passport, db) { app.use(passport.initialize()); app.use(passport.session()); + // Connect flash for flash messages + app.use(flash()); + // Routes should be at the last app.use(app.router);