Skip to content
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

[feat #117] 회원 탈퇴 API #118

Open
wants to merge 12 commits into
base: dev
Choose a base branch
from
Open

[feat #117] 회원 탈퇴 API #118

wants to merge 12 commits into from

Conversation

dudxo
Copy link
Collaborator

@dudxo dudxo commented Sep 24, 2024

관련 이슈

📑 작업 상세 내용

  • 카카오, 네이버 각 연결된 소셜 서비스 연결 끊기
  • 서비스 회원 탈퇴(SOFT DELETE) 미구현
    • 추후 논의 필요
  • 회원 탈퇴 시 기존 발급 된 AccessToken/RefreshToeken 삭제 및 블랙리스트 추가

💫 작업 요약

  • 서비스 회원탈퇴(SOFT DELETE)를 제외한 소셜 로그인 회원 탈퇴 로직 구현

🔍 중점적으로 리뷰 할 부분

  • 여러 논의를 위해서 선제 PR 올립니다..!
image - 카카오 개발 문서를 확인하면 회원 탈퇴(연결 끊기) 시 사용자 정보를 복구 불가능한 방법으로 파기해야된다고 합니다? 보관하면 안된다는데 이러면 SOFT DELETE를 하면 안되는것 같기도하네요.. - 네이버는 아직 문서를 제대로 읽어보지 않아서 잘 모르곘습니다. 추후 확인하고 남기겠습니다. - 개발 후 카카오 문서를 조금 더 읽어보니 회원 탈퇴 후 이에 대한 응답 값을 카카오 서버 측에 보내주어야 된다는데, 이에 대해 조금 더 확인해보고 진행하겠습니다.

@dudxo dudxo added the ✨ feat 기능 추가 label Sep 24, 2024
@dudxo dudxo self-assigned this Sep 24, 2024
@dudxo dudxo linked an issue Sep 24, 2024 that may be closed by this pull request
2 tasks
Copy link

github-actions bot commented Sep 24, 2024

Code Coverage

Overall Project 82.46% -3.64% 🍏
Files changed 0%

File Coverage
AuthController.java 57.38% -13.11%
MemberService.java 49.77% -20.81%
AuthService.java 43.99% -21.54%

Copy link

github-actions bot commented Sep 24, 2024

Test Results

 23 files   23 suites   14s ⏱️
112 tests 112 ✅ 0 💤 0 ❌
113 runs  113 ✅ 0 💤 0 ❌

Results for commit f0c3734.

♻️ This comment has been updated with latest results.

@dudxo dudxo requested a review from hyun2371 September 27, 2024 02:36
Copy link
Member

@hyun2371 hyun2371 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생 많으셨습니다! 팀회의 때 더 논의해봐요~

requestFactory.setReadTimeout(5000);

restTemplate.setRequestFactory(requestFactory);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 설정은 어디에 쓰이나요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OAuth2UnlinkService에서 사용하고 있습니다!


public Member saveOrUpdate(Oauth2Response oauth2Response) {
Member member = memberRepository.findBySocialEmail(oauth2Response.createSocialEmail())
.map(m -> {
m.updateSocialEmail(oauth2Response.createSocialEmail());
deleteExistingOauthAccessToken(m);
saveOauth2AccessToken(oauth2Response, m);
return m;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

두 개 메서드가 각각 무슨 역할인지 궁금합니다!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deleteExistingOauthAccessToken()는 이전 소셜 로그인을 통해 저장되어 있는 Oauth2AccessToken가 존재한다면 지운 다음
saveOauth2AccessToken()를 통해 새로운 Oauth2AccessToken()을 저장합니다

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

개인적으로 deleteOauthAccessTokenIfExists처럼 네이밍하면 더 명확해질 것 같습니다

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

감사합니다 ㅎㅎ 반영하겠습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feat 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

✨ 회원 탈퇴 API
2 participants