Skip to content

[Fix] 탈퇴 유저 JWT 인증 우회 및 회원탈퇴 정리 로직 정비 - #313

Merged
pooreumjung merged 3 commits into
developfrom
fix/#311-jwt-withdraw-cleanup
Aug 10, 2026
Merged

[Fix] 탈퇴 유저 JWT 인증 우회 및 회원탈퇴 정리 로직 정비#313
pooreumjung merged 3 commits into
developfrom
fix/#311-jwt-withdraw-cleanup

Conversation

@pooreumjung

@pooreumjung pooreumjung commented Aug 10, 2026

Copy link
Copy Markdown
Member

🧾 요약

  • 탈퇴(soft-delete)한 유저의 액세스 토큰이 JwtFilter 검증을 통과해버리는 인증 우회 문제를 막고, 회원탈퇴 정리 로직(카카오 연동 해제 누락, 블랙리스트 동기/비동기 불일치)을 정비했습니다.

🔗 이슈

✨ 변경 내용

  • JwtFilter에서 findByIdfindByIdAndDeletedFalse로 변경 - 탈퇴했거나 존재하지 않는 유저의 토큰은 JWT_USER_WITHDRAWN으로 인증 실패 처리 (기존엔 isSuspended()만 체크하고 deleted는 검사하지 않아, 탈퇴 유저 토큰이 만료 전까지 계속 유효했음)
  • 회원탈퇴 플로우에 OAuthKakaoClient.unlinkKakaoUser() 연결 - 정의만 되어있고 호출되지 않던 죽은 코드를 탈퇴 시 실제로 호출하도록 연결 (원본 oauthId를 익명화 전에 확보해 provider가 KAKAO일 때만 호출)
  • 회원탈퇴 시 액세스 토큰 블랙리스트 + refresh token 삭제를 logout()과 동일하게 동기 처리로 변경 - 기존엔 @Async + Thread.sleep 기반 재시도로 처리되어 logout()과 일관성이 없었고, 실패 시 토큰이 계속 유효한 창(window)이 생겼음. FCM 삭제/카카오 unlink 같은 외부 정리 작업은 기존처럼 비동기+재시도 유지

✅ 확인

  • 빌드 OK
  • 테스트 OK

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1e80f438-e52e-4212-a0ea-f196095f975b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pooreumjung pooreumjung self-assigned this Aug 10, 2026
@pooreumjung pooreumjung added the bug Something isn't working label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📊 테스트 커버리지 리포트

Overall Project 98.94% 🍏
Files changed 100% 🍏

File Coverage
JwtFilter.java 100% 🍏
UserWithdrawCleanupEventListener.java 100% 🍏
UserWithdrawCleanupRequestedEvent.java 100% 🍏
UserWithdrawCleanupDispatcher.java 100% 🍏
AuthService.java 100% 🍏
ErrorStatus.java 100% 🍏

@pooreumjung
pooreumjung merged commit fd50bab into develop Aug 10, 2026
4 checks passed
@howooyeon
howooyeon deleted the fix/#311-jwt-withdraw-cleanup branch August 11, 2026 14:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[fix] 탈퇴 유저 JWT 인증 우회 및 회원탈퇴 정리 로직 정비

1 participant