Skip to content

Document isAuthenticated #498

@cfjedimaster

Description

@cfjedimaster

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?

Activity

Tarabass

Tarabass commented on Jun 24, 2016

@Tarabass

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

JC3 commented on Dec 9, 2016

@JC3

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @cfjedimaster@Tarabass@JC3

        Issue actions

          Document isAuthenticated · Issue #498 · jaredhanson/passport