Skip to content

Conversation

@Uralauah
Copy link
Contributor

@Uralauah Uralauah commented Mar 29, 2025

⚙️refreshToken 만료 검증 로직 추가

📝 개요

refreshToken 만료 검증 로직 추가


⚙️ 구현 내용

기존에 토큰 재발급 과정에서 rt가 만료되었을 경우 따로 예외를 처리해주는 로직이 없어서
클라이언트에서 500 코드를 받게되는 문제점이 있었습니다.

재발급 과정에서 아래와 같이 rt가 만료되었는지 검증 과정을 겪어서 예외를 처리할 수 있도록 하였습니다.

public void isExpiredRefreshToken(String refreshToken) {
        try {
            tokenProvider.isExpired(refreshToken);
        } catch (ExpiredJwtException e) {
            throw new CustomException(JwtExceptionCode.REFRESH_TOKEN_EXPIRED);
        }
    }

🧪 테스트 결과

image

@Uralauah Uralauah merged commit e5051b2 into develop Mar 29, 2025
1 check passed
@Uralauah Uralauah deleted the refact/auth branch March 29, 2025 11:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants