Stripped from here https://github.com/saintedlama/passport-local-mongoose