회원탈퇴
- 이메일 가입자만 비밀번호 체크
This commit is contained in:
@@ -567,7 +567,10 @@ class MemberService(
|
||||
@Transactional
|
||||
fun signOut(signOutRequest: SignOutRequest, user: User) {
|
||||
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("비밀번호가 일치하지 않습니다.")
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user