Skip to content

Feature(HK-166): 이메일 저장하기 로직 구현#73

Merged
juiuj merged 2 commits intomainfrom
feature/HK-166-save-id
Sep 27, 2025
Merged

Feature(HK-166): 이메일 저장하기 로직 구현#73
juiuj merged 2 commits intomainfrom
feature/HK-166-save-id

Conversation

@juiuj
Copy link
Copy Markdown
Member

@juiuj juiuj commented Sep 25, 2025

Motivation

  • HK-166 참고
  • 사용자가 이메일 로그인 시 이메일을 저장하고자 함

Problem Solving

  • Remember Email 체크박스 UI 추가
    • 체크박스 선택 시 입력한 이메일을 쿠키에 저장(30일 유지)
    • 체크 상태면 쿠키에 이메일 저장
    • 해제 상태면 쿠키 삭제
    • 초기 렌더링 시 저장된 이메일이 있으면 자동 입력 & 체크박스 활성화
스크린샷 2025-09-25 오후 3 13 36

To Reviewer

  • Sign In 페이지가 전반적으로 영문이라 영어로 작성해두었는데 추후 언어 통일 협의 필요할 것 같습니다!

@juiuj juiuj requested review from Jsplix and soooheeee September 25, 2025 06:21
@juiuj juiuj self-assigned this Sep 25, 2025
@juiuj juiuj added the enhancement New feature or request label Sep 25, 2025
@aws-amplify-ap-northeast-2
Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-73.d15ua1f8x2sllg.amplifyapp.com

Copy link
Copy Markdown
Contributor

@soooheeee soooheeee left a comment

Choose a reason for hiding this comment

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

이메일 기억하기 기능이 추가돼서 로그인이 훨씬 편리해질 것 같아요 👏 언어 통일 부분 다음 회의에서 얘기해봅시다. 수고 많으셨습니다. 코멘트도 같이 확인 부탁드려요!
춤댄스GIF

}, []);

useEffect(() => {
if (rememberEmail) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

이메일 기억하기 체크박스를 활성화하는 순간, 로그인 성공 여부와 관계없이 그때 입력한 이메일이 바로 쿠키에 저장됩니다.
그래서 로그인에 실패하거나 그냥 입력만 하고 새로고침을 해도 이메일이 그대로 남습니다..!
image

보통은 로그인을 성공했을 때 마지막으로 쓴 이메일을 기억해 주는 흐름이라 코멘트 남겨봅니다!

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

넵 보안상 소희님께서 피드백 주신 흐름이 더 적절한 것 같아서 로직 수정하도록 하겠습니다!

Copy link
Copy Markdown
Contributor

@Jsplix Jsplix left a comment

Choose a reason for hiding this comment

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

고생하셨습니다 ㅎㅎ 코멘트 확인 부탁드릴게요!

Comment on lines +11 to +12
const expires = new Date();
expires.setDate(expires.getDate() + days);
Copy link
Copy Markdown
Contributor

@Jsplix Jsplix Sep 25, 2025

Choose a reason for hiding this comment

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

P4: 이 코드는 유효기간 설정인거같은데, 다른 곳에서 쿠키의 유효기간에 대한 검증을 진행하는가요?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

다른 곳에서는 일반적으로 보안 강화를 위해서 넣는다고 하긴하는데 위에 소희님께서 남겨주신 피드백대로 로직 흐름을 수정한다면 서버 의존성도 없고 세션 쿠키로 동작하기 때문에 따로 유효기간 수동 설정이 필요없을 것 같아요!
제거하겠습니다~!

Copy link
Copy Markdown
Member Author

@juiuj juiuj left a comment

Choose a reason for hiding this comment

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

피드백 반영해서 코드 수정했씁니다

Copy link
Copy Markdown
Contributor

@Jsplix Jsplix left a comment

Choose a reason for hiding this comment

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

확인했어요! 고생하셨습니당~ㅎ

@juiuj juiuj merged commit 2687188 into main Sep 27, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants