auth_backend...
This commit is contained in:
parent
419916c83b
commit
5efa84b054
@ -26,7 +26,7 @@ export class AuthController {
|
||||
|
||||
//jwt.strategy의 validate에서 true인경우 넘어옴
|
||||
@UseGuards(JwtRefreshTokenGuard)
|
||||
@Get('reload')
|
||||
@Post('reload')
|
||||
async reload(@Request() req) {
|
||||
return await this.authService.reload(req.user)
|
||||
}
|
||||
|
||||
@ -25,10 +25,12 @@ export class JwtRefreshTokenStrategy extends PassportStrategy(
|
||||
//AccessToken 인증
|
||||
async validate(payload: jwtPayloadRefreshToken) {
|
||||
try {
|
||||
return await this.authService.validateUser({
|
||||
const where = {
|
||||
email: payload.email,
|
||||
name: payload.name
|
||||
})
|
||||
}
|
||||
console.log(where)
|
||||
return await this.authService.validateUser(where)
|
||||
} catch (e) {
|
||||
throw new UnauthorizedException(e)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user