Skip to content

Commit

Permalink
Refactor: 인증번호 유효기간 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
yxhwxn committed Aug 5, 2024
1 parent 00df760 commit 80025f4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public ResponseEntity<ApiResponse<Void>> requestEmailAuth(@RequestBody @Valid Me

// 이메일 인증번호 확인(회원가입 시)
@PostMapping("/join/email/verification")
@Operation(summary = "이메일 인증번호 확인 API", description = "request : email, verificationCode, response: 인증번호 일치 시 true, 불일치 시 false")
@Operation(summary = "이메일 인증번호 확인 API", description = "request : email, verificationCode(인증번호 유효기간은 5분입니다.), response: 인증번호 일치 시 true, 불일치 시 false")
public ResponseEntity<ApiResponse<Void>> verifyEmailCode(@RequestBody @Valid MemberRequestDTO.EmailVerificationDTO request) {
memberService.verifyEmailCode(request.getEmail(), request.getVerificationCode());
return ResponseEntity.ok(ApiResponse.confirm(ResponseCode.CONFIRM));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ private void saveVerificationToken(String email, String code) {
EmailVerificationToken verificationToken = EmailVerificationToken.builder()
.email(email)
.token(code)
.expiryDate(LocalDateTime.now().plusHours(1))
.expiryDate(LocalDateTime.now().plusMinutes(5))
.build();

emailVerificationTokenRepository.deleteByEmail(email);
Expand Down

0 comments on commit 80025f4

Please sign in to comment.