How to reset password using Nodejs / Expressjs?

I am having difficulty performing a password reset for a user using nodejs. To answer a few questions, I am using express framework, my end is MongoDB, I am using bcrypt to hash passwords, and I am using sessions for session data. I want to send an email to the user with a new password so I can then get their password reset. I'm not sure exactly how to send an email using express. Also, I believe there are a few variables left out of the way, like the temporary timeout. My schema is pretty simple for the user:

var userSchema = new Schema({
    _id: Schema.ObjectId,
    firstName: String,
    lastName:  String,
    email: {type: String, unique: true},
    password: String
});

      

Doesn't sound like a Borken recording, but I'm at a loss. There are several pieces to this puzzle and I hope someone can lead me in the right direction. Suggestions?

+3


source to share





All Articles