-
Notifications
You must be signed in to change notification settings - Fork 0
[Feature] 회원 탈퇴 로직 구현 #41
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
Conversation
|
| struct AuthUser: Codable { | ||
| let id: String | ||
| let name: String | ||
| let email: String | ||
| let provider: SocialSignInProvider |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keychain에 저장하기 위해 Codable 프로토콜을 채택했습니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
info.plist에 정의된 키 값을 관리하고 불러오기 위함입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 외부 시스템과 통신하는 코드까지 유스케이스에 하드코딩이 되어있는 상태입니다.
후에 Auth 모듈을 구현하면서 분리해볼 예정입니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auth 모듈 분리 후 리팩토링 예정
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auth 모듈 분리 후 리팩토링 예정
|
|
||
| struct AppleSignInInfo { | ||
| let nonce: String? | ||
| let idCredential: ASAuthorizationAppleIDCredential | ||
| } | ||
|
|
||
| struct GoogleSignInInfo { | ||
| let user: GIDGoogleUser | ||
| } | ||
|
|
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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)!)! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안전하게 처리 필요
| if authUserManager.user?.provider == .google { | ||
| GIDSignIn.sharedInstance.signOut() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
switch
apple: break // 애플 로그아웃 API 제공하지 않음
f-lab-barry
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍



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