diff --git a/src/main/java/org/sopt/sweet/domain/member/service/OAuthService.java b/src/main/java/org/sopt/sweet/domain/member/service/OAuthService.java index 2ebb778..02484be 100644 --- a/src/main/java/org/sopt/sweet/domain/member/service/OAuthService.java +++ b/src/main/java/org/sopt/sweet/domain/member/service/OAuthService.java @@ -164,14 +164,14 @@ public MemberReissueTokenResponseDto reissue(MemberTokenResponseDto memberTokenR String refreshToken = memberTokenResponseDto.refreshToken(); String redisKey = "RT:" + memberId; - String storedRefreshToken = redisTemplate.opsForValue().get(redisKey); - jwtProvider.validateRefreshToken(storedRefreshToken); - jwtProvider.equalsRefreshToken(refreshToken, storedRefreshToken); - + jwtProvider.validateRefreshToken(refreshToken); String newAccessToken = issueNewAccessToken(memberId); String newRefreshToken = issueNewRefreshToken(memberId); redisTemplate.opsForValue().set(redisKey, newRefreshToken, REFRESH_TOKEN_EXPIRE_TIME, TimeUnit.SECONDS); + String storedRefreshToken = redisTemplate.opsForValue().get(redisKey); + jwtProvider.equalsRefreshToken(newRefreshToken, storedRefreshToken); + return MemberReissueTokenResponseDto.of(newAccessToken, newRefreshToken); }