title: how verify username and password with feathersjs?
body: <p>I want to authenticate by username and password.I use feathers authentication to do this but i don't understand after configuration my app , how verify my input data (username and password) in my server to allow feathers authenticate use it ?
  In my client i have this code to send my data (username and password) </p>
  
  <pre><code>app.authenticate({
      strategy: 'local',
      username: 'k0',//self.state.username,
      password:'kk'// self.state.password
    }).then(response =&gt; {
      console.log('Authenticated!', response);
    return app.passport.verifyJWT(response.accessToken);
  })
  .then(payload =&gt; {
    console.log('JWT Payload', payload);
    return app.service('users').get(payload.userId);
  })
  .then(user =&gt; {
    app.set('user', user);
    console.log('User', app.get('user'));
  })
  .catch(function(error){
    console.error('Error authenticating!', error);
  });
  </code></pre>
  
  <p>But i have an error </p>
  
  <pre><code>"POST http://localhost:4200/authentication 400 (Bad Request)
  Error authenticating! 
  BadRequest {type: "FeathersError", name: "BadRequest", message: "Missing credentials", code: 400, className: "bad-request", …}
  className
  :
  "bad-request"
  code
  :
  400
  data
  :
  {message: "Missing credentials"}
  errors
  :
  {}
  message
  :
  "Missing credentials"
  name
  :
  "BadRequest"
  type
  :
  "FeathersError"
  stack
  :
  "BadRequest: Missing credentials↵    at new BadRequest 
  __proto__
  :
  Error"
  </code></pre>
  
  <p>And this my server.js</p>
  
  <pre><code>var Users=[ {_id:"1",email:"k0",password:"kk"}, {_id:"2",email:"k1",password:"kk"}, {_id:"3",email:"k2",password:"kk"}, {_id:"4",email:"k3",password:"kk"}, {_id:"5",email:"k4",password:"kk"}]; 
  const feathers = require('feathers'); 
  const bodyParser = require('body-parser'); 
  const errors = require('feathers-errors'); 
  const errorHandler = require('feathers-errors/handler'); 
  const rest = require('feathers-rest'); 
  const hooks = require('feathers-hooks'); 
  const auth = require('feathers-authentication'); 
  const local = require('feathers-authentication-local'); 
  const memory = require('feathers-memory'); 
  const jwt = require('feathers-authentication-jwt');
   const app = feathers(); app.use(bodyParser.json()) app.use(bodyParser.urlencoded({ extended: true })); var cors = require('cors'); var port= process.env.PORT ||4200;app.use(cors());
  `
  
  .use('/users', {
  find(params) {
  return Promise.resolve(Users);
  }
  })
  .use(errorHandler());
  app.service('authentication').hooks({
  before: {
  create: [
  auth.hooks.authenticate('local'),
  customizeJWTPayload()
  ],
  remove: [
  auth.hooks.authenticate('jwt')
  ]
  }
  });
  app.service('users').hooks({
  before: {
  
  create: [
    local.hooks.hashPassword({ passwordField: 'password' })
  ]
  }
  `});app.post('/login', auth.express.authenticate('local', { successRedirect: '/app', failureRedirect: '/login'     }));
  
  app.get('/app', (req, res, next) =&gt; {
  res.json({ success: true });
  });
  
  app.get('/login', (req, res, next) =&gt; {
  res.json({ success: "faux" });
  });
  app.listen(port);`
  </code></pre>