Skip to content

OAuth usecase 리팩토링#68

Merged
Roy-wonji merged 3 commits intomainfrom
refaotor/oauth
Dec 17, 2025
Merged

OAuth usecase 리팩토링#68
Roy-wonji merged 3 commits intomainfrom
refaotor/oauth

Conversation

@Roy-wonji
Copy link
Contributor

✨ 작업 내용

  • OAuthUseCase를 각 소셜별 Provider로 분리하고 의존성 정리
  • UnifiedOAuthUseCase 로직을 OAuthFlowUseCase로 분리·위임, Provider 경로 정리
  • SessionStore를 async로 분리하고 TokenStorage/SignUp/AuthUseCase 리팩터링, LiveDependencies 주입 수정
  • SessionStoreRepositoryProtocol을 async API로 변경하고 실 구현/목/테스트를 모두 맞춤
  • TokenStorageUseCase와 호출부(AuthUseCase, SignUpUseCase)에서 토큰 저장을 async/await로 호출하도록 변경
  • OAuthFlowCoordinator 로그인 경로를 AuthUseCase로 통일하고 중복 AuthLoginUseCase 파일 제거
  • LiveDependencies에서 SessionStoreRepository 모듈 충돌(Domain/Data) 명시적으로 정리

📝 참고 사항

  • SessionStoreRepositoryProtocol 시그니처 변경으로 새 모의 객체나 구현체 추가 시 async 준수 필요
  • 카카오 흐름은 기존 로직 유지(약관 분기 제외) 상태이며, 토큰 저장도 async로 동작

Motivation 🥳

  • 세션 저장소를 actor/async로 안전하게 사용하고, OAuth 흐름을 Provider/Flow 단위로 분리해 재사용성과 가독성을 높이기 위함

Key Changes 🔥

  • OAuthUseCase Provider 분리 및 UnifiedOAuthUseCase → OAuthFlowUseCase 위임 구조
  • SessionStoreRepositoryProtocol 및 구현/Mock 전체 async화
  • TokenStorageUseCase.save를 async로 변경하고 모든 호출부에서 await 반영
  • AuthUseCase가 로그인 후 토큰 저장까지 처리하도록 정리, OAuthFlowCoordinator 로그인 경로 단순화
  • LiveDependencies에서 SessionStoreRepository 명시적 모듈 지정으로 init 모호성 해결

To Reviewers 🙏

  • async 변경으로 컴파일 에러 없는지, DI 등록 누락 없는지 확인 부탁드립니다.

* socialtype 마다 provider 로 구현
* SessionStore 구현
* 토큰 저장 및 로직 분리
@auto-assign auto-assign bot requested review from Peter1119 and minneee December 17, 2025 02:53
@Roy-wonji Roy-wonji changed the title Refaotor/oauth OAuth usecase 리팩토링 Dec 17, 2025
Copy link
Contributor

@minneee minneee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다~

Copy link
Contributor

@Peter1119 Peter1119 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 ~!

@Roy-wonji Roy-wonji merged commit d1d9401 into main Dec 17, 2025
1 check passed
@Roy-wonji Roy-wonji deleted the refaotor/oauth branch December 17, 2025 04:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants