Skip to content

Comments

[ feat ] : 이메일 인증#432

Merged
treejh merged 2 commits intomainfrom
front/refact/#421-발표-전-최종-수정
Apr 30, 2025

Hidden character warning

The head ref may contain hidden characters: "front/refact/#421-\ubc1c\ud45c-\uc804-\ucd5c\uc885-\uc218\uc815"
Merged

[ feat ] : 이메일 인증#432
treejh merged 2 commits intomainfrom
front/refact/#421-발표-전-최종-수정

Conversation

@treejh
Copy link
Owner

@treejh treejh commented Apr 30, 2025

[ feat ] : 이메일 인증

@vercel
Copy link

vercel bot commented Apr 30, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
book-tree ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 30, 2025 7:44pm



private final PasswordEncoder passwordEncoder;
private final EmailService emailService;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EmailService 의존성 주입이 잘 되었는지 확인해야 합니다. @Autowired 어노테이션을 사용했는지, @Service 로 선언된 EmailService Bean이 제대로 등록되었는지 확인해주세요.

//임시 비밀번호 발급 - 이메일로 비밀번호
public String findPasswordByEmail(String email){

public void findPasswordByEmail(String email){

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

임시 비밀번호 생성 로직(randomPassword)이 어디에도 보이지 않습니다. 임시 비밀번호 생성 부분을 추가하고, 보안 강화를 위해 충분한 길이와 복잡성을 갖도록 해야 합니다. 또한, 생성된 임시 비밀번호를 데이터베이스에 저장하거나, 사용자에게 전달하는 추가적인 로직이 필요할 수 있습니다. 비밀번호 변경을 위한 링크를 이메일로 보내는 것을 고려하는 것이 더 안전할 수 있습니다.

return randomPassword;
}

emailService.sendMail(emailMessage, "password",randomPassword);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이메일 전송에 사용되는 password라는 템플릿 이름이 적절한지 확인해야 합니다. 템플릿 이름을 더 명확하게 변경하는 것이 좋습니다. 예를 들어, password_reset 과 같이 좀 더 구체적인 이름을 사용하는 것이 좋습니다. 또한, emailService.sendMail 메서드의 에러 핸들링이 필요합니다. 이메일 전송 실패 시 적절한 예외 처리를 추가해야 합니다.

}, [activeCommentId, activeReplyPopoverId])

// ─── 프로필 이미지 불러오기 ────────────────────────────────────
// useEffect(() => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

주석 처리된 코드는 필요없는 코드인가요? 필요하다면 주석을 제거하고, 코드 스타일과 가독성을 개선하여 useEffect 훅 내부의 비동기 처리 부분을 더 명확하게 작성해야 합니다. fetch 호출의 에러 핸들링을 추가하고, 불필요한 try...catch 블록을 제거하여 코드를 간결하게 만들어야 합니다. userImages 상태 업데이트 로직을 더 효율적으로 작성할 수 있는 방법을 고려해야 합니다.

}, [postId])

useEffect(() => {
if (!post?.causerId) return

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

조건문에서 post?.causerId 를 확인하는 부분의 의도를 명확히 주석으로 남겨주세요. 어떤 상황에서 이 조건이 필요한지 설명해주시면 코드 이해도가 높아집니다. 또한, causerId 가 없을 때의 에러 핸들링 또는 대체 로직이 필요할 수 있습니다.

@treejh treejh merged commit 3f5928c into main Apr 30, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant