When implementing feathers-authentication-ldap in a scaffolding created with the command feathers-cli generate the ldap provider does not register. Starting the application produces the following error message...
/home/bnielsen/feathersjs/test/node_modules/feathers-authentication/lib/index.js:184
app.configure(provider(options));
^
TypeError: provider is not a function
at /home/bnielsen/feathersjs/test/node_modules/feathers-authentication/lib/index.js:184:21
at Array.forEach (native)
at EventEmitter.<anonymous> (/home/bnielsen/feathersjs/test/node_modules/feathers-authentication/lib/index.js:154:25)
at EventEmitter.configure (/home/bnielsen/feathersjs/test/node_modules/feathers/lib/application.js:138:8)
at EventEmitter.module.exports (/home/bnielsen/feathersjs/test/src/services/authentication/index.js:13:7)
at EventEmitter.configure (/home/bnielsen/feathersjs/test/node_modules/feathers/lib/application.js:138:8)
at EventEmitter.module.exports (/home/bnielsen/feathersjs/test/src/services/index.js:9:7)
at EventEmitter.configure (/home/bnielsen/feathersjs/test/node_modules/feathers/lib/application.js:138:8)
at Object.<anonymous> (/home/bnielsen/feathersjs/test/src/app.js:31:4)
at Module._compile (module.js:409:26)
Steps to reproduce the error...
npm install feathers-cli
./node_modules/.bin/feathers-cli generate
Select default options and use memory for the database.
* Atempt to start the application node src/index.js
I'm sure there is something wrong with the way I am setting up the ldap provider but so far I can't go from the example code that works to a working implementation in the generated scaffolding.
**UPDATE**
The problem is that feathers-cli is installing an old version of feathers-authentication.
When implementing feathers-authentication-ldap in a scaffolding created with the command feathers-cli generate the ldap provider does not register. Starting the application produces the following error message...
Steps to reproduce the error...
const authentication = require('feathers-authentication'); const ldap = require('feathers-authentication-ldap');
module.exports = function() { const app = this;
let config = app.get('auth');
app.configure(authentication(config)).configure(ldap()); };