MCPcopy Create free account
hub / github.com/Datakitpage/Datakit / validateUser

Method validateUser

backend/api/src/auth/auth.service.ts:30–37  ·  view source on GitHub ↗
(email: string, password: string)

Source from the content-addressed store, hash-verified

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 = {

Callers 2

validateMethod · 0.80

Calls 1

findByEmailMethod · 0.45

Tested by

no test coverage detected