From 5bb4ca35560fac906fd915a72d326414fffd4b28 Mon Sep 17 00:00:00 2001 From: hysong4u Date: Wed, 21 Feb 2024 00:42:59 +0900 Subject: [PATCH] =?UTF-8?q?[fix]=20=EB=A6=AC=ED=94=84=EB=A0=88=EC=89=AC=20?= =?UTF-8?q?=ED=86=A0=ED=81=B0=20=EB=A1=9C=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sopt/sweet/domain/member/service/OAuthService.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); }