Tuesday 16 May 2017

NodeJS, passport-jwt: Authenticate all user except in list

I am setting up a nodejs project with passportjs and passport-jwt. I see where you can specify passport.authenticate for each route you want to secure. However, I do not see a way to lock down all router except maybe login and register. I see where express-jwt allows for the use of express-unless, which seems to accomplish this functionality. Is there a similar mechanism for passport-jwt and if so how would this be accomplished?



via user1790300

No comments:

Post a Comment