-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
Apparently Passport adds isAuthenticated (and isUnauthenticated) to the Request object, as mentioned in this SO post: http://stackoverflow.com/questions/14188834/documentation-for-ensureauthentication-isauthenticated-passports-functions/14301657#14301657
Is there any reason why this isn't documented?
Tarabass, purezen, jony89, rmzr7, eventengine and 9 more
Activity
Tarabass commentedon Jun 24, 2016
I think the user was not authenticated..
Maybe the examples in the documentation needs an update too:
http://passportjs.org/docs/authorize (last code block)
JC3 commentedon Dec 9, 2016
Yeah it's a little ridiculous that this isn't documented, given that checking it is pretty much the entire ultimate goal of this library...
The consequence of this little mistake is a zillion tutorials that stop at the page authorization part, or goofie strategies like checking if random session fields are undefined.
It's sort of beyond me how Passport has gone on for so long with zero mention of this function on the page, in the readme, or in any other docs, given how important it is.