-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 게스트 회원 전환 로직 작성 #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| if (!fieldErrors.isEmpty()) { | ||
| throw new FieldValidationException(fieldErrors); | ||
| } | ||
| System.out.println(guestId); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
요 라인 지우는걸 깜빡하신 것 같습니다 ! !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
헉 맞네요!
brothergiven
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다👍👍👍
jung-min-ju
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
모두 확인했습니다! 전체적으로 에러처리도 잘 되어있는 것 같습니다. 한 가지 말하자면 하드 코딩이 되어 있는 곳이 종종 보인다는 건데, 이건 추후 수정해도 괜찮을 듯 합니다.
게스트 회원 전환 로직 작성
📝 개요
게스트 회원 전환 로직 작성
⚙️ 구현 내용
게스트가 회원으로 전환할 때, 게스트 계정으로 플레이했던 정보를 그대로 회원으로 전환하기 위한 기능을 구현하였습니다.
현재는 User 엔티티에 경험치, 레벨과 같은 정보가 추가되어있지 않아서 아래의 두 로직에 차이가 없지만 해당 부분이 생긴다면 기존의 정보를 옮기는 방식으로 수정할 계획입니다.
기존에 인증 과정에서 토큰에 포함된 사용자 정보가 실제 존재하지 않는 경우
(예: 게스트 → 회원 전환, 탈퇴한 회원 등),
UsernameNotFoundException예외가 발생했지만이를 처리하지 않아 500 에러가 반환되는 문제가 있었습니다.
JwtAuthenticationFilter에서 해당 예외를 catch 하여적절한 인증 실패 응답을 반환하도록 수정했습니다.