function isLoggedIn(req, res, next) {
    'use strict';
    if (req.isAuthenticated()) {
        return next();
    } else {
        res.redirect("/login");
    }
}
// Custom middleware used on the /secret route
Custom middleware used on the /secret route
Custom middleware used on the / secret route
function isLoggedIn(req, res, next) {
    'use strict';
    if (req.isAuthenticated()) {
        return next();
    } else {
        res.redirect("/login");
    }
}
function isLoggedIn ( req , res , next ) { 'use strict' ; if ( req . isAuthenticated ( ) ) { return next ( ) ; } else { res . redirect ( "/login" ) ; } }
Custom middleware used on the /secret route
Custom middleware used on the / secret route