I posted this question two days ago and it seems that there are not many views.
Why is req.user (Passport.js) undefined in my MERN app?
I am not very familiar with asking questions on SO. Before I posted that question I had already read the official guideline of SO about how to ask good questions. I wonder if my question is too long.
req.user
is defined. As far as I can tell, none of the code shown can be the cause of the issue, so people would have to sift through the two huge repositories linked. And as far as I understand (not an SME) it might not even be a code problem but a configuration problem.