회원탈퇴 #308

Merged
klaus merged 1 commits from test into main 2025-04-15 10:42:38 +00:00
1 changed files with 4 additions and 1 deletions
Showing only changes of commit 7649ce6e52 - Show all commits

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("비밀번호가 일치하지 않습니다.")
} }