feat: #260 이메일 주소 변경#274
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
Walkthrough이메일 주소 변경 기능을 구현합니다. 사용자가 새 이메일을 요청하면 인증 토큰을 발송하고, 토큰 확인으로 이메일을 업데이트합니다. 백엔드 엔드포인트, 서비스 로직, 데이터베이스 엔티티, 프론트엔드 UI와 API 클라이언트를 추가합니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User as 사용자
participant Frontend as 프론트엔드
participant AuthCtrl as AuthController
participant AuthSvc as AuthService
participant MailSvc as MailService
participant DB as Database
User->>Frontend: 새 이메일 입력 & 변경 요청
Frontend->>AuthCtrl: POST /auth/change-email/request
AuthCtrl->>AuthSvc: requestEmailChange(userId, newEmail)
AuthSvc->>DB: 기존 이메일 인증 확인
AuthSvc->>DB: 새 이메일 중복 체크
AuthSvc->>DB: 이전 토큰 무효화
AuthSvc->>DB: 새 토큰 생성 (30분 만료)
AuthSvc->>MailSvc: sendEmailChangeEmail(newEmail, token)
MailSvc->>User: 인증 이메일 발송
MailSvc-->>AuthSvc: 완료
AuthSvc-->>AuthCtrl: { message: "..." }
AuthCtrl-->>Frontend: 200 OK
Frontend->>User: 성공 메시지 표시
sequenceDiagram
participant User as 사용자
participant Frontend as 프론트엔드
participant AuthCtrl as AuthController
participant AuthSvc as AuthService
participant DB as Database
User->>Frontend: 이메일의 확인 링크 클릭<br/>(토큰 포함)
Frontend->>AuthCtrl: POST /auth/change-email/confirm
AuthCtrl->>AuthSvc: confirmEmailChange(userId, token)
AuthSvc->>DB: 토큰 검증<br/>(존재, 미사용, 미만료)
AuthSvc->>DB: 새 이메일 중복 체크
AuthSvc->>DB: user_authentications의<br/>providerId 업데이트
AuthSvc->>DB: 토큰을 사용됨(usedAt)으로 표시
AuthSvc-->>AuthCtrl: { message: "..." }
AuthCtrl-->>Frontend: 200 OK
Frontend->>User: 변경 완료 토스트 표시
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Summary
Test plan
Summary by CodeRabbit
릴리스 노트
새로운 기능
테스트