From 75f6290eadf7c4f1f063e8f3f94a9cc55abe4b53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EC=B5=9C=EC=A4=80=ED=9D=A0?= Date: Mon, 12 Sep 2022 15:08:55 +0900 Subject: [PATCH] nestjs_auth... --- src/auth/guards/local.strategy.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/auth/guards/local.strategy.ts b/src/auth/guards/local.strategy.ts index 2cf561c..9e389d5 100644 --- a/src/auth/guards/local.strategy.ts +++ b/src/auth/guards/local.strategy.ts @@ -1,7 +1,7 @@ /* eslint-disable prettier/prettier */ import { Strategy } from 'passport-local' import { PassportStrategy } from '@nestjs/passport' -import { Injectable, UnauthorizedException } from '@nestjs/common' +import { Injectable } from '@nestjs/common' import { AuthService } from '../auth.service' @Injectable() @@ -14,11 +14,6 @@ export class LocalStrategy extends PassportStrategy(Strategy) { //Login인증용 async validate(email: string, password: string): Promise { - try { - return await this.authService.validateUser(email, password) - } catch (e) { - console.log(e) - throw new UnauthorizedException(e.message) - } + return await this.authService.validateUser(email, password) } }