Skip to content

Conversation

@ljdongz
Copy link
Collaborator

@ljdongz ljdongz commented May 15, 2025

#️⃣ 연관된 이슈

📝 작업 내용

회원 탈퇴 로직을 구현했습니다.

🎨 스크린샷

💬 추가 설명

@ljdongz ljdongz requested a review from f-lab-barry May 15, 2025 14:58
@ljdongz ljdongz self-assigned this May 15, 2025
@sonarqubecloud
Copy link

Comment on lines +14 to +18
struct AuthUser: Codable {
let id: String
let name: String
let email: String
let provider: SocialSignInProvider
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

keychain에 저장하기 위해 Codable 프로토콜을 채택했습니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

info.plist에 정의된 키 값을 관리하고 불러오기 위함입니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

현재 외부 시스템과 통신하는 코드까지 유스케이스에 하드코딩이 되어있는 상태입니다.
후에 Auth 모듈을 구현하면서 분리해볼 예정입니다.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Auth 모듈 분리 후 리팩토링 예정

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Auth 모듈 분리 후 리팩토링 예정

Comment on lines +19 to +28

struct AppleSignInInfo {
let nonce: String?
let idCredential: ASAuthorizationAppleIDCredential
}

struct GoogleSignInInfo {
let user: GIDGoogleUser
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Auth(Core 계층) 모듈로 분리했을 때 Domain 모듈이 AuthenticationServices, GoogleSignIn 모듈의 데이터 타입(idCredential, user)들을 직접 의존하지 않도록 하기 위해 추상화 했습니다.

self.authUserManager = authUserManager
}

func signIn(using info: AppleSignInInfo) async throws {

Choose a reason for hiding this comment

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

execute

// TODO: 아래 코드들을 Core(Auth) 모듈에서 처리하도록 리팩토링
/// 애플 서버에 Refresh Token 요청
let urlString = "https://\(Config.value(forKey: .getRefreshTokenURL))/getRefreshToken?code=\(codeString)"
let url = URL(string: urlString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)!

Choose a reason for hiding this comment

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

안전하게 처리 필요

Comment on lines +26 to +28
if authUserManager.user?.provider == .google {
GIDSignIn.sharedInstance.signOut()
}

Choose a reason for hiding this comment

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

switch

apple: break // 애플 로그아웃 API 제공하지 않음

Copy link

@f-lab-barry f-lab-barry left a comment

Choose a reason for hiding this comment

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

👍

Base automatically changed from feature/#36 to develop May 19, 2025 15:27
@ljdongz ljdongz merged commit 1e29749 into develop May 19, 2025
2 checks passed
@ljdongz ljdongz linked an issue May 19, 2025 that may be closed by this pull request
@ljdongz ljdongz deleted the feature/#37 branch May 19, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 회원 탈퇴 로직 구현

3 participants