Conversation
|
| struct AuthUser: Codable { | ||
| let id: String | ||
| let name: String | ||
| let email: String | ||
| let provider: SocialSignInProvider |
There was a problem hiding this comment.
keychain에 저장하기 위해 Codable 프로토콜을 채택했습니다.
There was a problem hiding this comment.
info.plist에 정의된 키 값을 관리하고 불러오기 위함입니다.
There was a problem hiding this comment.
현재 외부 시스템과 통신하는 코드까지 유스케이스에 하드코딩이 되어있는 상태입니다.
후에 Auth 모듈을 구현하면서 분리해볼 예정입니다.
There was a problem hiding this comment.
Auth 모듈 분리 후 리팩토링 예정
There was a problem hiding this comment.
Auth 모듈 분리 후 리팩토링 예정
|
|
||
| struct AppleSignInInfo { | ||
| let nonce: String? | ||
| let idCredential: ASAuthorizationAppleIDCredential | ||
| } | ||
|
|
||
| struct GoogleSignInInfo { | ||
| let user: GIDGoogleUser | ||
| } | ||
|
|
There was a problem hiding this comment.
Auth(Core 계층) 모듈로 분리했을 때 Domain 모듈이 AuthenticationServices, GoogleSignIn 모듈의 데이터 타입(idCredential, user)들을 직접 의존하지 않도록 하기 위해 추상화 했습니다.
| self.authUserManager = authUserManager | ||
| } | ||
|
|
||
| func signIn(using info: AppleSignInInfo) async throws { |
| // TODO: 아래 코드들을 Core(Auth) 모듈에서 처리하도록 리팩토링 | ||
| /// 애플 서버에 Refresh Token 요청 | ||
| let urlString = "https://\(Config.value(forKey: .getRefreshTokenURL))/getRefreshToken?code=\(codeString)" | ||
| let url = URL(string: urlString.addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)!)! |
| if authUserManager.user?.provider == .google { | ||
| GIDSignIn.sharedInstance.signOut() | ||
| } |
There was a problem hiding this comment.
switch
apple: break // 애플 로그아웃 API 제공하지 않음



#️⃣ 연관된 이슈
📝 작업 내용
회원 탈퇴 로직을 구현했습니다.
🎨 스크린샷
💬 추가 설명