Question · NestJS course · Module 4: Authentication
usernameField property in LocalStrategy
What does setting usernameField: 'email' in the super() of LocalStrategy cause?
Answer options
- Changes the column name in the database
- Validates whether the field is a valid email address
- Passport looks for the 'email' field instead of 'username' in the request body
- Automatically sends a verification email
You can check the correct answer by solving this task in the CodeWorlds game.