Node + Express + Passport: req.user Undefined

My issue was not specifying to send cookies when using fetch on the client-side. It worked after including the credentials: ‘include’ field in the request.

fetch('/api/foo', {credentials: 'include'})

Leave a Comment