I’ve been looking for a while, and can’t see to find a definitive documentation source. When I search for these, the first Google results are to StackOverflow.
Are there any more middleware functions similar to this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
While not explicitly documented anywhere easily found, you can see where the the
isAuthenticatedandisUnauthenticatedflags are set in the Passport code at https://github.com/jaredhanson/passport/blob/a892b9dc54dce34b7170ad5d73d8ccfba87f4fcf/lib/passport/http/request.js#L74.ensureAuthenticatedis not official, but can be implemented via the following: