BasicStrategy not found
elspru opened this issue · comments
There is insufficient documentation to get a working example.
Using the snippet from the README leads to the following error:
/srv/www/routes/v1.js:8
passport.use(new BasicStrategy(
^
ReferenceError: BasicStrategy is not defined
at Object. (/srv/www/routes/v1.js:8:18)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Module.require (internal/modules/cjs/loader.js:636:17)
at require (internal/modules/cjs/helpers.js:20:18)
at Object. (/srv/www/server.js:11:12)
at Module._compile (internal/modules/cjs/loader.js:688:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
at Module.load (internal/modules/cjs/loader.js:598:32)
at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
at Function.Module._load (internal/modules/cjs/loader.js:529:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:741:12)
at startup (internal/bootstrap/node.js:285:19)
Please add the following line to the README:
const BasicStrategy = require('passport-http').BasicStrategy;
It shouldn't require reading the source code to figure out how to use your library when you have a README. include the require lines and save people countless hours of Error messages and ill feelings.
.