[fix] 비밀번호 변경 기능 api 로그인 여부에 따라 분리 - #68
Merged
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthrough비밀번호 재설정 흐름을 전화번호 인증 검증으로 강화했습니다. 인증되지 않은 사용자의 재설정 엔드포인트 접근을 허용하고, Redis에서 인증 상태를 추적하며, 기존 로그인 사용자의 비밀번호 변경과 분리했습니다. Changes
Sequence Diagram(s)sequenceDiagram
actor User
participant Client
participant AuthController
participant AuthService
participant PhoneVerificationCodeRepository
participant Redis
participant UserService
User->>Client: 전화번호 입력 및 인증코드 요청
Client->>AuthController: POST /phone-verification/codes
AuthController->>AuthService: requestPhoneVerificationCode(phoneNumber)
AuthService->>PhoneVerificationCodeRepository: savePhoneVerificationCode(phoneNumber, code)
PhoneVerificationCodeRepository->>Redis: SET phone:verification:{phoneNumber} {code}
User->>Client: 인증코드 입력
Client->>AuthController: POST /phone-verification/confirm
AuthController->>AuthService: confirmPhoneVerificationCode(phoneNumber, code)
AuthService->>PhoneVerificationCodeRepository: deleteByPhoneNumber(phoneNumber)
PhoneVerificationCodeRepository->>Redis: DEL phone:verification:{phoneNumber}
AuthService->>PhoneVerificationCodeRepository: savePasswordResetVerified(phoneNumber)
PhoneVerificationCodeRepository->>Redis: SET password:reset:verified:{phoneNumber} true (TTL: 10min)
User->>Client: 새 비밀번호 입력
Client->>UserController: PATCH /password/reset
UserController->>UserService: resetPassword(phoneNumber, newPassword)
UserService->>PhoneVerificationCodeRepository: isPasswordResetVerified(phoneNumber)
PhoneVerificationCodeRepository->>Redis: EXISTS password:reset:verified:{phoneNumber}
UserService->>PhoneVerificationCodeRepository: deletePasswordResetVerified(phoneNumber)
PhoneVerificationCodeRepository->>Redis: DEL password:reset:verified:{phoneNumber}
UserService->>UserService: 비밀번호 인코딩 및 저장
UserService-->>UserController: 성공 응답
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
검토 포인트: 안녕하세요! 이 변경사항을 검토하실 때 다음 부분을 특히 살펴봐 주시면 감사하겠습니다:
협력해주셔서 감사합니다! 🙏 ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
#️⃣ 연관된 이슈
📝 작업 내용
🖼️ 스크린샷 (선택)
💬 리뷰 요구사항 (선택)
Summary by CodeRabbit
릴리스 노트
새로운 기능
개선사항