From 73aeca20de08a2a4034476d6282b256bea431465 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Tue, 6 Apr 2021 04:10:24 +0200 Subject: :bug: fix login --- src/routes/auth/login.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/routes/auth/login.ts b/src/routes/auth/login.ts index de7a16d4..15aa2371 100644 --- a/src/routes/auth/login.ts +++ b/src/routes/auth/login.ts @@ -40,7 +40,7 @@ router.post( } // the salt is saved in the password refer to bcrypt docs - const same_password = await bcrypt.compare(password, user.hash); + const same_password = await bcrypt.compare(password, user.user_data.hash); if (!same_password) { throw FieldErrors({ password: { message: req.t("auth:login.INVALID_PASSWORD"), code: "INVALID_PASSWORD" }, -- cgit 1.5.1