Skip to content

Commit

Permalink
fix: 인증번호 유효시간 10분으로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuChaeHyun committed Nov 8, 2023
1 parent 7f541f3 commit 953fe0b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ public ResponseEntity<UserResponse> findUserResponseByEmail(@PathVariable String
}
}

//토큰 재발급
@PatchMapping("/reissue")
public ResponseEntity<JWTAuthResponse> reissue(HttpServletRequest request,
HttpServletResponse response) {
Expand All @@ -85,13 +86,15 @@ public ResponseEntity<JWTAuthResponse> reissue(HttpServletRequest request,
return ResponseEntity.ok(newAccessToken);
}

//이메일 인증번호 전송
@PostMapping("/emails/verification-requests")
public ResponseEntity sendMessage(@RequestParam("email") @Valid String email) {

userService.sendCodeToEmail(email);
return new ResponseEntity<>(HttpStatus.OK);
}

//이메일 인증번호 검증
@GetMapping("/emails/verifications")
public ResponseEntity verificationEmail(@RequestParam("email") @Valid @Email String email,
@RequestParam("code") String authCode) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spring:
connection-timeout: 5000
timeout: 5000
write timeout: 5000
auth-code-expiration-millis: 1800000 # 30분
auth-code-expiration-millis: 600000 # 10분

eureka:
instance:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/application-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ spring:
connection-timeout: 5000
timeout: 5000
write timeout: 5000
auth-code-expiration-millis: 900000 # 15분
auth-code-expiration-millis: 600000 # 10분

eureka:
instance:
Expand Down

0 comments on commit 953fe0b

Please sign in to comment.