Skip to content

feat: 소셜 로그인 회원 탈퇴#365

Merged
s-hwan merged 2 commits intodevelopfrom
feat/#362
Apr 4, 2025
Merged

feat: 소셜 로그인 회원 탈퇴#365
s-hwan merged 2 commits intodevelopfrom
feat/#362

Conversation

@rladmstn
Copy link
Contributor

@rladmstn rladmstn commented Mar 30, 2025

📌 Related Issue

close #362
close be-6

🚀 Description

  • 소셜 로그인으로 회원가입한 유저의 경우, 비밀번호를 설정하지 않아 기존 회원 탈퇴 API를 사용하면 정상적인 탈퇴가 불가능 합니다.

  • request에 isOAuthAccount를 받아 해당 유저가 소셜 로그인 유저면 비밀번호 검증 없이 즉시 회원 탈퇴가 진행됩니다.

  • 소셜 로그인 유저가 아닐 경우 비밀번호 검증 이후에 회원 탈퇴를 진행합니다.

  • 기존 회원 정보 조회 response에도 githubName를 추가해 소셜 로그인한 유저인지 구분하도록 만들었습니다.

📢 Review Point

  • 소셜 로그인의 회원 탈퇴를 다른 곳들에서는 어떻게 하나 찾아봤는데, 별다른 검증 없이 탈퇴시켜주더라구요.
  • 뭐 다른 방법이 있는진 모르겠습니다. 아는 분 있으면 알려주세요
  • 소셜 로그인 유저일 경우 비밀번호가 null일 것을 대비해서 request의 password에 @NotBlank 어노테이션을 제거했는데, 만약 isOAuthAccount가 false인 채로 password를 null로 전송하면 비밀번호 매칭 메서드에서 NPE가 발생합니다..
  • 사용자측에선 일어날 일 없는거고 아마 API를 사용하는 측의 실수로 발생할 수 있는 케이스인 것 같은데, 이런 API 오사용에 대한 검증도 꼼꼼하게 추가를 해야할지 고민입니다

📚Etc (선택)

@rladmstn rladmstn added the new-feature 기능 추가 label Mar 30, 2025
@rladmstn rladmstn requested review from s-hwan and sh0723 March 30, 2025 14:00
@rladmstn rladmstn self-assigned this Mar 30, 2025
@github-actions
Copy link

Test Results

 18 files   18 suites   5s ⏱️
305 tests 305 ✅ 0 💤 0 ❌
307 runs  307 ✅ 0 💤 0 ❌

Results for commit 92558e3.

Copy link
Contributor

@sh0723 sh0723 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다!
은수씨가 말한대로 사용자가 isOAuthAccount를 false하게 하며 password를 null로 하는것은 불가능하긴한데, 그렇게 api를 요청하지 못하는건 또 아니니,, 이럴 땐 어떻게 해야하는지 궁금하긴합니다 ...!

Copy link
Contributor

@s-hwan s-hwan left a comment

Choose a reason for hiding this comment

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

잘봤습니다. 이렇게 수정하면 클라이언트에서 할 일이 많아지는건가요??
뭔가 전체적으로 유저가 예외를 발생 시킬것 같은 부분은 많아보이지 않아서요

@s-hwan s-hwan merged commit 479bcd9 into develop Apr 4, 2025
2 checks passed
@linear
Copy link

linear bot commented Apr 4, 2025

hwangjokim pushed a commit that referenced this pull request Apr 8, 2025
* feat: 소셜 로그인 회원 탈퇴 시 비밀번호 검증 제거

* feat: 회원 정보 조회 시 github 닉네임 응답 추가
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

소셜 로그인 회원 탈퇴

3 participants