Fix token creation on admin registration (#648)

This commit is contained in:
Miguel Serrano 2019-10-18 10:03:05 +02:00 committed by GitHub
parent de33a6a7b6
commit 78d179c459

View file

@ -21,7 +21,7 @@ module.exports = (grunt) ->
user.save (error) ->
throw error if error?
ONE_WEEK = 7 * 24 * 60 * 60 # seconds
OneTimeTokenHandler.getNewToken user._id, { expiresIn: ONE_WEEK }, (err, token)->
OneTimeTokenHandler.getNewToken "password", { expiresIn: ONE_WEEK, email:user.email, user_id: user._id.toString() }, (err, token)->
return next(err) if err?
console.log ""