Conversation
- EmailSignupView.vue 신규 생성: 이메일/비밀번호/닉네임 폼, 실시간 유효성 검사, 비밀번호 강도 바, API 에러 인라인 표시, 가입 즉시 자동 로그인
- LoginView.vue 개편: 이메일 로그인 폼, 구분선, 소셜 전용 계정 토스트 알림(4105), 가입 링크 추가
- useAuth.js: login() 응답 구조 버그 수정(response.data.data), JWT decode로 memberId 추출, signup() 추가
- validators.js: email/password/nickname/passwordMatch 유효성 함수 구현
- errorCodes.js: AUTH_ERROR_CODES 네임스페이스 추가(4101~4105)
- endPoint.js: REGISTER → SIGNUP('/auth/signup') 교체
- auth.service.js: register() → signup() 교체
- router/index.js: afterEach 조건에 /signup 추가(WebSocket 연결 트리거)
- mainRoutes.js: /signup 라우트 등록
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (11)
📝 WalkthroughWalkthroughThis PR implements email-based authentication by updating API endpoints, introducing signup/login flows, adding form validation utilities, creating signup and enhanced login views, managing JWT tokens with member ID extraction, and configuring routes to support the new signup path. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User (Email Signup)
participant EmailSignupView as EmailSignupView
participant useAuth as useAuth Composable
participant AuthAPI as Auth API<br>/auth/signup
participant PushService as Push Service
participant Router as Router
User->>EmailSignupView: Submit email, password
EmailSignupView->>EmailSignupView: Validate fields
EmailSignupView->>useAuth: signup({ email, password })
useAuth->>AuthAPI: POST /auth/signup
AuthAPI-->>useAuth: { accessToken, refreshToken, memberId }
useAuth->>useAuth: Decode JWT, extract memberId
useAuth->>useAuth: Store tokens & memberId in state
useAuth->>useAuth: Restart tokenRefreshService
useAuth->>PushService: Register push tokens
PushService-->>useAuth: Response (errors ignored)
useAuth-->>EmailSignupView: { success: true }
EmailSignupView->>Router: Navigate to /main
Router-->>User: Redirect complete
sequenceDiagram
participant User as User (Email Login)
participant LoginView as LoginView
participant useAuth as useAuth Composable
participant AuthAPI as Auth API<br>/auth/login
participant PushService as Push Service
participant Router as Router
User->>LoginView: Submit email, password
LoginView->>useAuth: login({ email, password })
useAuth->>AuthAPI: POST /auth/login
AuthAPI-->>useAuth: { accessToken, refreshToken, memberId? }
useAuth->>useAuth: Decode JWT if memberId absent
useAuth->>useAuth: Store tokens & memberId in state
useAuth->>useAuth: Restart tokenRefreshService
useAuth->>PushService: Register push tokens
PushService-->>useAuth: Response (errors ignored)
useAuth-->>LoginView: { success: true } or<br>{ success: false, code, message }
alt Success
LoginView->>Router: Navigate to redirect param or /main
Router-->>User: Redirect complete
else Failure - Social Only Account
LoginView->>LoginView: Show toast notification
LoginView-->>User: Display error message
else Failure - Other
LoginView->>LoginView: Set loginError state
LoginView-->>User: Display inline error
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
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 |
Summary by CodeRabbit