nestjs_auth...

This commit is contained in:
최준흠 2022-09-12 14:51:56 +09:00
parent 8a170ec303
commit c21837ada5

View File

@ -14,11 +14,10 @@ export class LocalStrategy extends PassportStrategy(Strategy) {
//Login인증용 //Login인증용
async validate(email: string, password: string): Promise<any> { async validate(email: string, password: string): Promise<any> {
const user = await this.authService.validateUser(email, password) try {
//console.log(user) return await this.authService.validateUser(email, password)
if (!user) { } catch (e) {
throw new UnauthorizedException() new UnauthorizedException(e.message)
} }
return user
} }
} }