From ce2c38e1882882da13e631fdde62a79b879d13b6 Mon Sep 17 00:00:00 2001 From: Philipp Dormann Date: Fri, 4 Dec 2020 17:25:15 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92argon2=20password=20hashing=20w/=20?= =?UTF-8?q?salt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ref #14 --- src/models/creation/CreateUser.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/models/creation/CreateUser.ts b/src/models/creation/CreateUser.ts index 92f6e22..28dadc1 100644 --- a/src/models/creation/CreateUser.ts +++ b/src/models/creation/CreateUser.ts @@ -49,9 +49,7 @@ export class CreateUser { newUser.middlename = this.middlename newUser.lastname = this.lastname newUser.uuid = new_uuid - // TODO: hash password here or in controller/ in User model via setter? - this.password = await argon2.hash(this.password); - newUser.password = this.password + newUser.password = await argon2.hash(this.password + new_uuid); console.log(newUser) return newUser;