DEV Community

Discussion on: Node Authentication using passport.js - Part 1

Collapse
 
minemaxua profile image
Maksym Minenko

With
passport.use('local-signup', new LocalStrategy({
usernameField : 'email',

emails with a dot in the left part (like john.doe@gmail.com) get saved without the dot (johndoe@gmail.com).
How can that be prevented?

Collapse
 
menaiala profile image
Menai Ala Eddine

Why you want to prevent it?

Collapse
 
minemaxua profile image
Maksym Minenko • Edited

For several reasons. For example, what if we want to show the email to the user "Your email is ..." And he/she sees it and says: "Oh, shit, that's not my email, those guys can't even store it properly!"