Compare commits

...

2 Commits

Author SHA1 Message Date
klaus 8ad13c289e Merge pull request '회원탈퇴' (#308) from test into main
Reviewed-on: #308
2025-04-15 10:42:37 +00:00
Klaus 7649ce6e52 회원탈퇴
- 이메일 가입자만 비밀번호 체크
2025-04-15 19:28:28 +09:00
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("비밀번호가 일치하지 않습니다.")
} }