Use email with Passport-local. Previous help not working

It seems to me you just changed the name of the argument in the LocalStrategy callback to "email". Passport doesn't automagically know that the field is named email though, you have to tell it.

By default, LocalStrategy expects to find credentials in parameters named username and password. If your site prefers to name these fields differently, options are available to change the defaults.

passport.use(new LocalStrategy({
    usernameField: 'email',
    passwordField: 'passwd'
  },
  function(username, password, done) {
    // ...
  }
));

Source


If you are new to NestJs and wondering how to achieve the above. You can pass the config options in the super() method like this:

super({ 
  usernameField: 'email',
  passwordField: 'password'
})

source