(email: string, password: string)
| 28 | ) {} |
| 29 | |
| 30 | async validateUser(email: string, password: string): Promise<any> { |
| 31 | const user = await this.usersService.findByEmail(email); |
| 32 | if (user && (await bcrypt.compare(password, user.password))) { |
| 33 | const { password, ...result } = user; |
| 34 | return result; |
| 35 | } |
| 36 | return null; |
| 37 | } |
| 38 | |
| 39 | async login(user: any, ipAddress?: string, userAgent?: string) { |
| 40 | const payload = { |
no test coverage detected