nestjs_auth...
This commit is contained in:
parent
8a170ec303
commit
c21837ada5
@ -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
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user