Fix: Remove password reset token after successful reset (#248)

Signed-off-by: Knut Ahlers <knut@ahlers.me>

Signed-off-by: Knut Ahlers <knut@ahlers.me>
pull/249/head
Knut Ahlers 2022-11-04 15:52:07 +01:00 committed by GitHub
parent 1109537675
commit d5cd829834
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -289,7 +289,7 @@ router.post('/password_reset_requests/:confirm_token/confirm', function(req, res
bcrypt.genSalt(10, (err, salt) => {
bcrypt.hash(password, salt, function(err, hash) {
user.password_hash = hash;
user.password_token = null;
user.password_reset_token = null;
user.save().then(function(updatedUser) {
res.sendStatus(201);
});