Closed jakelowen closed 7 years ago
I'm guessing you're looking at the documentation for the unreleased 3.0.0 version on GitHub. If you're getting the latest released version from NPM you should go by the README here: https://www.npmjs.com/package/passport-jwt.
I want to support this issue. README talks about "jsonWebTokenOptions" passing as object in thew configuration but there is no implementation for it in the code. Please update this documentation, too.
@Olu93 as stated in my comment - The README on github by default shows the version of the file checked into the master branch. Master branch contains the latest developement version. You should be looking at the README on npmjs.org for the released version or, if you want to use Github, switch to the tag corresponding to the version that you are using.
Closing. v3.0.0 was released and this wasn't really an issue to begin with.
If you're getting your pacakages form NPM and not github I recommend reading the README as hosted on NPM since it matches the latest published version.
README documentation gives example of
opts.jwtFromRequest = ExtractJwt.fromAuthHeaderAsBearerToken();
It appears that
fromAuthHeaderAsBearerToken()
is no longer a valid method. Generates error:TypeError: _passportJwt.ExtractJwt.fromAuthHeaderAsBearerToken is not a function