Conversation
|
Caution Review failedThe pull request is closed. WalkthroughRefactors OAuth login to use a new OAuthProfile DTO across strategies and processing. Introduces TokenProvider interface and makes JwtTokenProvider implement it. Renames TokenService to TokenReissueService and updates usages. Modularizes OAuth member handling with new components for conflict resolution, creation, profile completeness, and refresh token storage. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant FE as Client
participant OS as OAuthService
participant SF as OAuthStrategyFactory
participant ST as OAuthStrategy
participant CP as OAuthMemberConflictProcessor
participant MC as OAuthMemberCreator
participant PC as ProfileCompletenessChecker
participant TP as TokenProvider
participant RS as RefreshTokenStore
User->>FE: Click "Login with X"
FE->>OS: loginOrSignUp(type, code)
OS->>SF: getStrategy(type)
SF-->>OS: strategy
OS->>ST: getOAuthProfile(code)
ST-->>OS: OAuthProfile
OS->>CP: resolveConflict(OAuthProfile)
alt Existing active member
CP-->>OS: SocialAccountResult(existing Member)
OS->>PC: isComplete(memberId)
PC-->>OS: boolean
else No existing or removed inactive
CP-->>OS: SocialAccountResult.empty()
OS->>MC: createFrom(OAuthProfile)
MC-->>OS: Member
OS->>PC: isComplete(memberId)
PC-->>OS: boolean
end
OS->>TP: createToken(memberId)
TP-->>OS: TokenDTO(access, refresh)
OS->>RS: replace(memberId, refresh)
RS-->>OS: ok
OS-->>FE: SocialLoginSignInDTO
FE-->>User: Signed in
sequenceDiagram
autonumber
actor User
participant FE as Client
participant TC as TokenController
participant TR as TokenReissueService
participant TP as TokenProvider
User->>FE: Uses refresh token
FE->>TC: POST /token/reissue (refreshToken)
TC->>TR: reissueToken(refreshToken)
TR->>TP: reissueToken(refreshToken)
TP-->>TR: TokenDTO
TR-->>TC: TokenDTO
TC-->>FE: 200 OK + TokenDTO
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
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 (18)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
#️⃣ 연관된 이슈
🔎 작업 내용
OAuthStrategy수정 : 도메인 생성의 책임을 이동시켜 도메인 - 전략 간 결합 감소EnumMap사용OAuthMemberProcessor책임 분리📷 스크린샷 (선택)
💬리뷰 요구사항 (선택)
Summary by CodeRabbit