소셜 로그인 이메일 미필수 정책 적용
소셜 로그인 시 이메일 동의 없이도 계정 생성이 가능하도록 변경합니다. Member 엔티티의 email 필드를 선택 사항으로 변경하고, 관련 API 응답 및 인증 로직에서 이메일이 없는 경우에 대한 처리를 추가합니다.
This commit is contained in:
@@ -126,7 +126,7 @@ class AdminMemberService(
|
||||
|
||||
GetAdminMemberListResponseItem(
|
||||
id = it.id!!,
|
||||
email = it.email,
|
||||
email = it.email ?: "",
|
||||
nickname = it.nickname,
|
||||
profileUrl = if (it.profileImage != null) {
|
||||
"$cloudFrontHost/${it.profileImage}"
|
||||
@@ -160,6 +160,7 @@ class AdminMemberService(
|
||||
val member = repository.findByIdAndActive(memberId = request.memberId)
|
||||
?: throw SodaException(messageKey = "admin.member.reset_password_invalid")
|
||||
|
||||
member.password = passwordEncoder.encode(member.email.split("@")[0])
|
||||
val email = member.email ?: throw SodaException(message = "이메일이 없는 계정은 비밀번호 재설정이 불가능합니다.")
|
||||
member.password = passwordEncoder.encode(email.split("@")[0])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user