Review the solution for the Adding Authentication challenge.
Add the following check_password method in the src/users/controller.ts file:
check_password
src/users/controller.ts
private async check_Password(password: string, user: User) { const hashedPassword = hashWithSalt(password, user.salt); if (hashedPassword === user.hash) { return Promise.resolve(true); } return Promise.reject(false); }
Then make the following call ...