Обнаружено, что мне нужно вызвать passport.authenticate в качестве промежуточного программного обеспечения для маршрута и выполнить цепочку маршрутов, чтобы он работал правильно!
app.route('/authenticate')
.post(passport.authenticate('local'))
.post((req: Request, res: Response, next: NextFunction) => {
try {
console.log(chalk.cyanBright('Request from: ') + chalk.yellowBright(req.originalUrl));
console.log(chalk.cyanBright('Request type: ') + chalk.yellowBright(req.method));
next();
} catch (error) {
console.error(chalk.redBright(error));
}
}, this.authenticationController.authenticate);