auth_backend...

This commit is contained in:
최준흠 2022-09-20 09:05:45 +09:00
parent 419916c83b
commit 5efa84b054
2 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,7 @@ export class AuthController {
//jwt.strategy의 validate에서 true인경우 넘어옴 //jwt.strategy의 validate에서 true인경우 넘어옴
@UseGuards(JwtRefreshTokenGuard) @UseGuards(JwtRefreshTokenGuard)
@Get('reload') @Post('reload')
async reload(@Request() req) { async reload(@Request() req) {
return await this.authService.reload(req.user) return await this.authService.reload(req.user)
} }

View File

@ -25,10 +25,12 @@ export class JwtRefreshTokenStrategy extends PassportStrategy(
//AccessToken 인증 //AccessToken 인증
async validate(payload: jwtPayloadRefreshToken) { async validate(payload: jwtPayloadRefreshToken) {
try { try {
return await this.authService.validateUser({ const where = {
email: payload.email, email: payload.email,
name: payload.name name: payload.name
}) }
console.log(where)
return await this.authService.validateUser(where)
} catch (e) { } catch (e) {
throw new UnauthorizedException(e) throw new UnauthorizedException(e)
} }