auth0-blog / nodejs-jwt-authentication-sample

A NodeJS API that supports username and password authentication with JWTs
MIT License
688 stars 267 forks source link

Update user-routes.js #6

Closed infinity1975 closed 8 years ago

infinity1975 commented 8 years ago

You sent req.body.email but referred to req.body.username (which was only in the "db" model), i suggest you use email instead of username on all places.

chenkie commented 8 years ago

Good call! We just merged a PR from a while back that allows the server to receive either a username or email. https://github.com/auth0/nodejs-jwt-authentication-sample/pull/5