-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat-be: 이메일 인증 기능 구현 #848
Conversation
1729358679.500039 |
1729358681.903989 |
1729358683.242319 |
📌 Test Coverage Report
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고 많으셨습니다. 👍
코멘트 하나 남겼으니 확인 부탁드려요.
} | ||
|
||
private void verify(String storedVerificationCode, String inputVerificationCode) { | ||
if (storedVerificationCode == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
옵셔널을 활용할 수 없을까요? ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
verify 로직을 VerificationCodeUtil로 옮기고 나니, 매개변수에 Optional을 달고 다녀야하는 문제점 때문에 적용하지 않았습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dev 환경에 redis docker 설정도 추가해주세요~
- 서비스 테스트도 추가해주세용
|
||
public void saveVerificationCode(String email, String verificationCode) { | ||
redisTemplate.opsForValue() | ||
.set(REDIS_PREFIX + email, verificationCode, VERIFICATION_CODE_EXPIRATION, TimeUnit.MINUTES); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10분인 이유가 있나요? 단순 궁금증입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
10분이 인증하기에 적당한 시간이여서 설정했습니다. 더 좋은 시간이 있다면 반영하겠습니다~
verify(storedVerificationCode, inputVerificationCode); | ||
} | ||
|
||
private void verify(String storedVerificationCode, String inputVerificationCode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이 메서드를 VerificationCodeUtil에 넣는건 어떠신가요?
@Async | ||
public void sendVerificationCode(String to, String verificationCode) { | ||
try { | ||
String subject = "인증 코드 안내"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
제목에 [크루루] 이런거 붙어있으면 좋겠어용
|
||
@DisplayName("저장된 인증 코드가 없으면 예외가 발생한다.") | ||
@Test | ||
void verifyCode_verificationCodeNotFoundException() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
성공 테스트도 있으면 좋을 것 같아요.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kwoun Ki Ho <fingercut3822@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kwoun Ki Ho <fingercut3822@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Kwoun Ki Ho <fingercut3822@gmail.com>
fix-be: applicantCard 조회 시 평가 점수와 갯수가 모든 프로세스에 대해 나오는 버그 수정 (#902) fix-be: 이메일 인증 시 이미 가입된 이메일은 예외를 던지도록 변경 (#906) feat-be: RTR 방식 Redis로 변경 (#889) feat-be: 이메일 전송 템플릿 적용 (#897) feat-be: 이메일 인증 후, 회원가입 이메일의 인증 여부 확인 (#882) refactor-be: 식별자에 Tsid 적용 (#856) feat-be: 이메일 전송 로직 중 지원자 일괄 조회 로직 구현 (#869) fix-be: github action의 Redis 환경 변수 추가 (#871) feat-be: 이메일 인증 기능 구현 (#848)
Original issue description
목적
작업 세부사항
EMAIL_VALID_01
closes #846