TIL

Multiple auth and optional auth in passport.js | MEAN

I learnt about optional auth using passport.js strategies.

Running all strategy check in express.js (main initialization of the app) and validation within middlewares where needed.

Misc.

You can rename and infact use same strategy multiple times by assigning a name to it using code:

passport.use('name_goes_here',new LocalStrategy({}))

Ref