Skip to content

Commit

Permalink
Merge pull request #61 from 0702Yoon/main
Browse files Browse the repository at this point in the history
refactor : email에 Authcode 붙이는 거 삭제
  • Loading branch information
0702Yoon authored Aug 13, 2024
2 parents 33b882b + 6ce9ea4 commit 164d874
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,13 @@ public void sendCodeToEmail(String toEmail) {
String authCode = this.createCode();
mailService.sendEmail(toEmail, title, authCode);
// 이메일 인증 요청 시 인증 번호 Redis에 저장 ( key = "AuthCode " + Email / value = AuthCode )
mailService.saveEmailAuthCode(AUTH_CODE_PREFIX + toEmail, authCode, Duration.ofMillis(this.authCodeExpirationMillis));
mailService.saveEmailAuthCode(toEmail, authCode, Duration.ofMillis(this.authCodeExpirationMillis));
}


public EmailVerificationResult verifiedCode(String email, String authCode) {
memberChecker.checkDuplicatedEmail(email);
String redisAuthCode = mailService.getAuthCode(AUTH_CODE_PREFIX + email);
String redisAuthCode = mailService.getAuthCode(email);
boolean authResult = redisAuthCode.equals(authCode);

return EmailVerificationResult.of(authResult);
Expand Down

0 comments on commit 164d874

Please sign in to comment.