Why doesn’t the route login page need to be redirected to the user page when PASSPORT middleware is used?

  node.js, question
.post(passport.authenticate('local'), function (req, res, next) {
    // access the authenticate username and password.
    if (!req.user.active) { // have not been active.
        req.logout();   // delete req.user & clear login session
        res.status(400);
        return res.send('Unactived');
    }
    res.end();
});
  1. It seems that your routing address has not been written

  2. End method is to end the current request and return the corresponding data, that is to say, what is your current address is what, you said redirection can try this method redirect