Merged
Conversation
Contributor
|
코드 잘 읽었습니다. 구조가 잘 정리되어 있어서 읽기 편했어요. |
kelly-chui
reviewed
May 27, 2025
| } | ||
|
|
||
| /// 네트워크로 받은 응답을 세션에 반영합니다. | ||
| private func storeSession(from response: SNMNetworkResponse) throws { |
Contributor
There was a problem hiding this comment.
로직이 중복되니 signInAnonymously()도 이 메소드 쓰면 좋을 것 같아요
|
|
||
| func signIn() async throws -> String { | ||
| // 중복 로그인 요청 방지 및 continuation misuse/crash 방지 | ||
| guard continuation == nil else { throw AppleAuthError.signInFailed } |
Contributor
There was a problem hiding this comment.
P4.
아래에 signInAlreadyInProgress도 정의되어 있어서 signInFailed로 하신 이유가 궁금합니다!
| if let windowScene = UIApplication.shared.keyWindow?.windowScene { | ||
| ASPresentationAnchor(windowScene: windowScene) | ||
| } else { | ||
| ASPresentationAnchor() |
Contributor
There was a problem hiding this comment.
이건 정말 개인적으로 한 고민인데요.
사실상 else 분기가 실행될 일이 없다고 생각하지만, 만에 하나 이런 경우엔 UI 리턴 vs. 크래시 어떤게 좋을까요? (크래시 정보 수집 vs. 크래시 안정성 유지? 인거 같아요)
windowScene이 nil이라는 건 둘 다 앱 정상 플로우는 기대하지 못하는 지점인데 뭐가 더 좋을지 잠깐 고민해봤어요. 🤔
Comment on lines
+48
to
+57
| private func resumeOnce(with result: Result<String, Error>) { | ||
| guard let continuation else { return } | ||
| self.continuation = nil | ||
| switch result { | ||
| case .success(let idToken): | ||
| continuation.resume(returning: idToken) | ||
| case .failure(let error): | ||
| continuation.resume(throwing: error) | ||
| } | ||
| } |
kelly-chui
approved these changes
May 27, 2025
pearhyunjin
approved these changes
Jun 7, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔖 Issue Number
#85
📙 작업 내역
(중요) 프로비저닝 파일, Secrets.xcconfig 업데이트 필요
구글, 애플 로그인 구현
애플 로그인은 기본적으로 delegate 패턴으로만 결과를 반환합니다. 프로젝트 내 사용의 편의를 위해 Swift Concurrency 형태로 래핑했습니다.
Supabase email, idToken 회원가입, 로그인 구현
회원가입 이탈 대응
회원가입 분기처리
/// redirectTo: 인증 메일을 클릭했을 때 리다이렉트되는 URL 주소를 입력합니다. /// 입력하지 않은 경우, supabase dashboard에 기입된 주소로 리다이렉트 됩니다. @discardableResult func signUp( parameter: SupabaseEmailAuthParameter, redirectTo: String? = nil ) async throws -> SupabaseUser { do { let response = try await networkProvider.request( with: SupabaseAuthRequest.signUpWithEmail( parameter: parameter, redirectTo: redirectTo ) ) let userResponse = try jsonDecoder.decode( SupabaseUserResponse.self, from: response.data ) let user = SupabaseUser(from: userResponse) if user.emailVerified == nil { // 이미 Authentication에 등록된 사용자가 signUp 시도 throw SupabaseAuthError.alreadExistEmail } return user } catch { throw SupabaseAuthError.signUpFailed } }📝 PR 특이사항
👻 관련 개발일지
supabase 이메일 로그인 구현
supabase cron 설정
supabase idToken 로그인 구현
애플 로그인
google 로그인 구현