회원탈퇴

- 이메일 가입자만 비밀번호 체크
This commit is contained in:
Klaus 2025-04-15 19:28:28 +09:00
parent 5759a51017
commit 7649ce6e52
1 changed files with 4 additions and 1 deletions

View File

@ -567,7 +567,10 @@ class MemberService(
@Transactional @Transactional
fun signOut(signOutRequest: SignOutRequest, user: User) { fun signOut(signOutRequest: SignOutRequest, user: User) {
val member = repository.findByEmail(user.username) ?: throw SodaException("로그인 정보를 확인해주세요.") val member = repository.findByEmail(user.username) ?: throw SodaException("로그인 정보를 확인해주세요.")
if (!passwordEncoder.matches(signOutRequest.password, member.password)) { if (
member.provider == MemberProvider.EMAIL &&
!passwordEncoder.matches(signOutRequest.password, member.password)
) {
throw SodaException("비밀번호가 일치하지 않습니다.") throw SodaException("비밀번호가 일치하지 않습니다.")
} }