[feat] 비밀번호 재설정 페이지 및 토큰 재발급 기능 구현#39
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (16)
✅ Files skipped from review due to trivial changes (3)
📝 WalkthroughWalkthrough비밀번호 찾기 3단계 플로우(이메일→휴대폰 SMS 인증→비밀번호 재설정)를 새로 추가하고, 토큰 자동 갱신·401 재시도·로그아웃 서버 호출 및 회원가입 중복 확인 검증을 강화합니다. Changes비밀번호 찾기 기능
인증 인프라 개선
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60분 복잡도 분석:
Suggested reviewers
🚥 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)
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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🧹 Nitpick comments (1)
src/app/App.tsx (1)
15-15: ⚡ Quick win신규 라우트 페이지도 lazy 로딩으로 맞춰주세요.
FindPasswordPage만 정적 import라 초기 번들에 포함됩니다.SignupPage와 동일하게lazy + Suspense로 맞추면 라우팅 전략이 일관되고 초기 로드 비용을 줄일 수 있습니다.As per coding guidelines "src/app/**: 라우팅 구조가 lazy loading을 활용하는지 확인".
Also applies to: 71-74
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/app/App.tsx` at line 15, FindPasswordPage is statically imported and should be changed to lazy loading to match SignupPage; replace the static import of FindPasswordPage with React.lazy (same pattern used for SignupPage), import Suspense from React (or reuse existing Suspense wrapper) and ensure the route rendering for FindPasswordPage (and the other routes referenced around the same block) are wrapped in a Suspense fallback so the component is loaded asynchronously and removed from the initial bundle; use the same naming and error boundaries/pattern used by SignupPage to keep routing consistent.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/pages/find-password/hooks/useFindPasswordPhoneVerification.ts`:
- Around line 43-51: When the phone number changes, the previous SMS
confirmation object may be reused; update handlePhoneChange to also clear
smsConfirmationRef.current (reset the ref) and any related state, and update
verifySms to guard usage of smsConfirmationRef by first checking smsSent (e.g.,
return/throw if !smsSent) before accessing smsConfirmationRef.current so
previous confirmation contexts cannot be reused; apply the same pattern to the
other phone-change/verify flows referenced around the verifySms handler and the
similar block at lines 86-101.
- Line 14: The hook useFindPasswordPhoneVerification currently imports useTimer
from a pages-level module which creates cross-page coupling; relocate useTimer
into a shared or features layer (e.g., shared/hooks or features/timer) and
update the import in useFindPasswordPhoneVerification to reference the new
shared/features path, ensuring the exported name remains useTimer and that any
tests or usages are updated to the new module; additionally, adjust any barrel
exports if needed so useFindPasswordPhoneVerification imports the stable
shared/features symbol rather than a pages/ submodule.
In `@src/pages/find-password/index.tsx`:
- Line 9: The find-password page directly imports the PhoneVerification
component from the signup page causing an illicit upward-layer dependency;
extract PhoneVerification into a shared feature (e.g., move the component file
to src/features/auth/PhoneVerification or
src/shared/components/PhoneVerification) and export it from that new location,
then update imports in both src/pages/find-password/index.tsx and the signup
page to import from the new shared/features path (ensure the component’s named
export PhoneVerification remains intact and update any related CSS/assets
imports accordingly).
In `@src/shared/api/auth.ts`:
- Around line 462-469: logoutSession currently reads UI state directly via
useAuthStore.getState(), coupling the API layer to the store; change
logoutSession to accept the needed values from callers (e.g., scope and
isLoggedIn) and remove any direct useAuthStore.getState() calls so the function
only performs HTTP work (use getAuthApiBasePath(scope) internally). Update
callers to pass scope (and optionally isLoggedIn) and ensure logoutSession
returns/throws based solely on HTTP results without touching stores or other
layers.
In `@src/shared/lib/axiosInstance.ts`:
- Around line 72-79: The queued requests pushed into failedQueue must mark
originalRequest._retry = true so they don't trigger another refresh after a
failed retry; update the branch inside the isRefreshing block where you create
the new Promise and push to failedQueue so that before returning/creating the
promise you set originalRequest._retry = true (and ensure you also set it again
in the .then handler before calling authInstance) so both the queued item and
the retry path use the _retry flag; reference isRefreshing, failedQueue,
originalRequest, and authInstance when making this change.
---
Nitpick comments:
In `@src/app/App.tsx`:
- Line 15: FindPasswordPage is statically imported and should be changed to lazy
loading to match SignupPage; replace the static import of FindPasswordPage with
React.lazy (same pattern used for SignupPage), import Suspense from React (or
reuse existing Suspense wrapper) and ensure the route rendering for
FindPasswordPage (and the other routes referenced around the same block) are
wrapped in a Suspense fallback so the component is loaded asynchronously and
removed from the initial bundle; use the same naming and error
boundaries/pattern used by SignupPage to keep routing consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b2b6eb03-0970-4dc8-90c1-c5b3b326c2e9
📒 Files selected for processing (13)
src/app/App.tsxsrc/pages/find-password/hooks/useFindPasswordPhoneVerification.tssrc/pages/find-password/index.tsxsrc/pages/login/index.tsxsrc/pages/my/index.tsxsrc/pages/signup/components/PhoneVerification.tsxsrc/pages/signup/hooks/useEmailVerification.tssrc/pages/signup/hooks/usePhoneVerification.tssrc/shared/api/auth.tssrc/shared/constants/routes.tssrc/shared/lib/authApiPath.tssrc/shared/lib/axiosInstance.tssrc/shared/lib/refreshToken.ts
ID
변경 내용
구현 사항
구현 시연 (필요 시)
2026-05-20.3.58.05.mov
Summary by CodeRabbit
릴리스 노트
New Features
Refactor