codestates / Bobpago

재료만 알려줘, 밥파고가 해결해줄께 🤖
https://www.bobpago.com
5 stars 3 forks source link

Fix/email authentication #178

Closed tjdgns5272 closed 3 years ago

tjdgns5272 commented 3 years ago
    const { email, password } = checkSignInDto;
    const user = await this.usersRepository.findOne({ email });
    const oldUser = await this.usersRepository.findOne({ email, password });

    const checkPassword = await bcrypt.compare(password, user.password);
    if (checkPassword || oldUser) {
            // 로그인 처리
    }