Tuesday, October 22, 2013

Using 'email' instead of 'username' in Passport.js

Just spent ah hour debugging why Passport.js would not forward my login request to the LocalStrategy. After putting some logs inside the strategy itself I have realized that it expect to see a 'username' field in the form, while I was sending an 'email'. Better answer (not mine) with code example here.