Quality Assurance - Issue with "Logging a User Out"

What is your hint or solution suggestion?

Hello!

While working my way through the QA curriculum, I have noticed that the code suggestion in the problem explanation is incorrect. Even if the user uses the same exact code as suggested in the problem body at the end, the code will fail to pass the tests.
The code in question:

app.route('/logout')
  .get((req, res) => {
    req.logout();
    res.redirect('/');
});

This part of the code is incorrect as of Passport 0.6.0, due to “req.logout” requiring a callback function, which is not passed here. To pass all the tests, the code should instead look like this:

app.route('/logout')
    .get((req, res) => {
      req.logout(function(err) {
        if (err) { return next(err); }
        res.redirect('/');
      });
  });

( Source: CherryDT - https://stackoverflow.com/a/72336399/19349854 )

I don’t feel competent enough to contribute to the FCC codebase directly. Additionally, due to my current skill level, I feel like I could be doing something wrong and producing an unnecessary work-around for a self-made problem. This is why I have decided to create this post instead of contributing directly, and I apologize if the post is unnecessary or fails to follow any existing guidelines.

tl;drPassport 0.6.0 update causes the code provided in the aforementioned problem to work incorrectly, as it requires a callback function. Above, I have provided a modified version of the code that passes all the tests.

Challenge: Logging a User Out

Link to the challenge:

You must not have installed the version of Passport specified in the challenge instructions. The challenge code provided in the Guide will pass if you use the correct version specified.

You’re right - I somehow totally overlooked that. Rookie mistake. I feel silly now. The thread can be closed.

We will leave it open in the hopes that someone will use the search feature on the forum.