-
Notifications
You must be signed in to change notification settings - Fork 1
로컬 로그인 & 회원가입 구현 #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
로컬 로그인 & 회원가입 구현 #51
Conversation
- 로그인 관련 API URI 일부 변경 - SecurityConfig 설정 변경( 로그인 경로 ) - User 필드 추가 ( loginType, passwordHash )
|
Caution Review failedThe pull request is closed. Walkthrough로컬 회원가입/로그인 기능이 추가되었고, 게스트 로그인 경로가 변경되었다. User 엔티티에 비밀번호 해시와 로그인 타입이 도입되었으며, 서비스 레이어는 LoginType 기반 흐름으로 확장되었다. 보안 설정과 에러 코드가 이에 맞게 보강되었고, DTO/리포지토리도 추가·수정되었다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant Controller as UserAuthController
participant Service as UserCommandService
participant Repo as UserRepository
participant Encoder as PasswordEncoder
rect rgba(224,247,250,0.6)
note over Client,Service: 로컬 회원가입 (POST /users/signup/local)
Client->>Controller: LocalSignUpDto(email, password)
Controller->>Service: localSignUp(dto)
Service->>Repo: existsByEmail(email)?
alt 이메일 존재함
Service-->>Controller: throw SIGNUP_EMAIL_EXISTS
Controller-->>Client: 400 LOGIN4001
else 신규
Service->>Encoder: encode(password)
Service->>Repo: save(User(email, passwordHash, loginType=LOCAL))
Service-->>Controller: Unit
Controller-->>Client: 200 OK (no body)
end
end
sequenceDiagram
autonumber
actor Client
participant Controller as UserAuthController
participant Service as UserCommandService
participant Repo as UserRepository
participant Encoder as PasswordEncoder
participant JWT as TokenProvider
rect rgba(232,245,233,0.6)
note over Client,JWT: 로컬 로그인 (POST /users/login/local)
Client->>Controller: LocalLoginDto(email, password)
Controller->>Service: localLogin(dto)
Service->>Repo: findByEmail(email)
alt 사용자 없음
Service-->>Controller: throw USER_NOT_FOUND
Controller-->>Client: 404 USER_NOT_FOUND
else 사용자 있음
Service->>Encoder: matches(raw, passwordHash)
alt 비밀번호 불일치
Service-->>Controller: throw LOGIN_INVALID_PASSWORD
Controller-->>Client: 400 LOGIN4003
else 비밀번호 일치
Service->>JWT: generateToken(user)
Service-->>Controller: UserLoginResponseDTO.LoginDto(token, ...)
Controller-->>Client: 200 OK (ApiResponse<TokenResponseDto>)
end
end
end
sequenceDiagram
autonumber
actor Client
participant Controller as UserAuthController
participant Service as UserCommandService
participant Repo as UserRepository
participant JWT as TokenProvider
rect rgba(255,249,196,0.6)
note over Client,Service: 게스트/카카오 로그인 공통 흐름 (isNewUser with LoginType)
Client->>Controller: 로그인 요청 (Guest/Kakao)
Controller->>Service: guestLogin()/loginOrRegisterByKakao()
Service->>Repo: findByExternalIdOrEmail(...)
alt 기존 사용자
Service->>JWT: generateToken(user)
Service-->>Controller: LoginDto(token, isNewUser=false)
else 신규 사용자
Service->>Repo: save(User(..., loginType=GUEST/KAKAO))
Service->>JWT: generateToken(newUser)
Service-->>Controller: LoginDto(token, isNewUser=true)
end
Controller-->>Client: 200 OK
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 📜 Recent review detailsConfiguration used: CodeRabbit UI 💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration. 📒 Files selected for processing (9)
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Join our Discord community for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Summary by CodeRabbit