Repository navigation
fix(web): 인증번호 재발송을 3분 제한 추가 - #86
Open
ParkSungju01 wants to merge 1 commit into
Open
ParkSungju01 wants to merge 1 commit into
ParkSungju01 wants to merge 1 commit into
Conversation
회원가입, 아이디 찾기, 비밀번호 찾기의 인증번호 발송 버튼을 같은 번호·이메일로 보낸 뒤 인증 타이머(3분)가 끝날 때까지 막는다. 막힌 동안 버튼에 남은 시간을 보여주고, 입력값을 바꾸면 바로 다시 보낼 수 있다. 발송 함수도 함께 감싸 버튼 상태와 관계없이 잠긴 동안 API를 호출하지 않는다. Closes #85
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
koin-web | be4d9bf | Nov 14 2026, 08:01 AM |
Contributor
자동 리뷰 결과 (claude-opus-5-5, 독립 검증)
발견 사항
적용된 수정
독립 검증 통과 항목
주의
자동 merge
|
2 tasks
jenna1030
approved these changes
Nov 14, 2026
jenna1030
left a comment
Contributor
There was a problem hiding this comment.
수고하셨습니다!
작은 이슈 하나 남겨두었으니 확인 부탁드립니다.
| */ | ||
| function useResendLock(target: string, isTimerRunning: boolean, secondsLeft: number) { | ||
| const [sentTarget, setSentTarget] = useState<string | null>(null); | ||
| const isResendLocked = isTimerRunning && sentTarget !== null && sentTarget === target; |
Contributor
There was a problem hiding this comment.
입력값 변경 시 기존 코드에서 stopTimer()를 호출해서 재발송 잠금도 함께 풀리는 것 같습니다.
발송 후 번호 끝자리를 지웠다가 같은 숫자를 다시 입력하면 3분이 지나지 않아도 같은 번호로 재발송이 가능할 것 같은데 1. 발송한 번호와 만료 시각 저장 2. 별도 타이머를 두고 입력값 변경 시에도 멈추지 않는 식으로 해야할거같습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경
회원가입, 아이디 찾기, 비밀번호 찾기의 인증번호 재발송 버튼을 제한 없이 누를 수 있어, 짧은 시간에 하루 발송 한도를 모두 쓸 수 있었습니다. 기존에는 발송 직후 3초만 버튼이 막혔고, 회원가입 PC 화면은 그마저도 없었습니다.
같은 번호·이메일로 인증번호를 보낸 뒤 인증 타이머(3분)가 끝날 때까지 재발송을 막았습니다.
useResendLock(utils/hooks/auth/useResendLock.ts): 마지막으로 보낸 대상과 현재 입력값이 같고 타이머가 도는 중이면 잠급니다. 잠금 상태를 따로 켜고 끄지 않고 매번 계산해서, 타이머 만료·상태 초기화·입력값 변경 시 자동으로 풀립니다.markSent: 발송 API 성공 응답의 요청 값으로 보낸 대상을 기록합니다. 실패하면 기록하지 않아 바로 재시도할 수 있습니다.withResendLock: 발송 함수를 감싸 잠긴 동안 API를 호출하지 않습니다. 버튼 비활성화와 별개로 한 번 더 막습니다.resendButtonText: 잠긴 동안 버튼 문구를 「재발송 02:13」처럼 남은 시간으로 바꿉니다.usePhoneVerification(회원가입·비밀번호 찾기 휴대폰),usePhoneVerificationInFindId(아이디 찾기 휴대폰),useEmailVerification(아이디·비밀번호 찾기 이메일). 회원가입 모바일 단계는 자체 발송 로직이라 같은 훅을 직접 붙였습니다.바꾸지 않은 것
isDisabled(발송 직후 3초 잠금)는 그대로 둡니다. 회원가입 PC와 비밀번호 찾기 PC 휴대폰 화면에서 같은 값이 인증 완료 후 번호 입력칸을 고정하는 데도 쓰여서, 바꾸면 그 동작까지 달라집니다. 두 용도를 나누는 정리는 따로 하겠습니다.ScreenShot
검증
pnpm typecheck,pnpm lint,pnpm format:check,pnpm --filter @koin/web test통과.pnpm dev:web에서 아이디 찾기 PC 휴대폰 화면으로 발송 후 버튼이 막히고 남은 시간이 표시되는 것, 번호를 바꾸면 바로 풀리는 것을 확인했습니다.