Почему не работает переход по функции next()?
Браузер постоянно делает запросы, страница загружается, в терминале Node.js вижу 'checkAuth() is TRUE'. Но переход по адресу не происходит.
function checkAuth() {
	return app.use((req, res, next) => {
		if (req.user) {
			console.log('checkAuth() is TRUE');
			next();
		} else {
			console.log('checkAuth() is FALSE');
			res.redirect('/');
		}
	});
}
app.get('/home', checkAuth(), (req, res) => {
	res.sendFile(__dirname + "/private/home.html")
});
А вот такая конструкция работает:
function checkAuth() {
	return app.use((req, res, next) => {
		if (req.user) {
			console.log('checkAuth() is TRUE');
			//next();
			res.sendFile(__dirname + "/private/home.html");
		} else {
			console.log('checkAuth() is FALSE');
			res.redirect('/');
		}
	});
}
app.get('/home', checkAuth(), (req, res) => {
	//res.sendFile(__dirname + "/private/home.html")
});