Skip to content

[#600] 맥에서 소셜 로그인이 안되는 현상을 해결한다#603

Merged
opficdev merged 11 commits into
developfrom
fix/#600-mac-login
Jun 13, 2026
Merged

[#600] 맥에서 소셜 로그인이 안되는 현상을 해결한다#603
opficdev merged 11 commits into
developfrom
fix/#600-mac-login

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • 맥에서 푸시 권한이 꺼진 상태로 로그인한 기존 세션이 이후 권한을 켰을 때 fcmToken을 backfill하지 못하는 문제 해결 목적

📝 작업 내용

📌 요약

  • 로그인 시 fcmToken이 없어도 인증 성공 처리하도록 수정
  • AppDelegate에서 FCM 동기화 트리거를 이벤트 발행 중심으로 분리
  • FCMTokenSyncHandler에서 APNs 수신 이후 현재 FCM token backfill 흐름 처리
  • FCMTokenSyncHandler 동작 테스트 추가
  • 앱 버전 1.2 반영

🔍 상세

  • Google, Apple, GitHub 로그인에서 messaging.token() 강제 호출 제거
  • AuthDataResponse.fcmToken을 optional로 변경
  • 사용자 upsert 시 fcmToken이 없으면 tokens 문서에 값을 쓰지 않도록 처리
  • UIScene.didActivateNotification 시점에 FCM 동기화 요청 이벤트 발행
  • APNs token 수신 시 didReceiveAPNSToken 이벤트 발행
  • FCMTokenSyncHandler
    • remote notification registration 요청
    • APNs token 적용
    • 현재 FCM token fetch 후 Firestore 저장
    • refreshed FCM token 저장
      흐름 담당
  • PushMessagingService는 권한 확인, APNs token 연결, FCM token fetch 책임만 유지
  • FCMTokenSyncHandlerTests로 current token sync, nil no-op, refreshed token sync, APNs token backfill 케이스 검증 추가

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this Jun 13, 2026
@opficdev opficdev added the qa TestFlight에 배포 label Jun 13, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

이번 PR에서는 FCM 토큰 동기화 로직을 개선하여 앱 활성화 시점에 토큰을 동기화하고, NotificationCenter를 통해 AppDelegate와 PushMessagingService 간의 결합도를 낮췄습니다. 이에 대한 피드백으로, 백그라운드 스레드에서 메인 스레드 API가 호출되어 발생할 수 있는 스레드 안전성 문제를 방지하기 위해 DispatchQueue.main.async를 사용할 것과, 불필요한 중첩 Task 생성을 피하기 위해 메서드를 async로 리팩토링할 것을 제안했습니다. 또한, Void? 타입을 일반 Void로 단순화하여 코드 가독성을 높이도록 권장했습니다.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread Application/DevLogApp/Sources/App/Delegate/AppDelegate.swift Outdated
Comment thread Application/DevLogApp/Sources/App/Handler/FCMTokenSyncHandler.swift
Comment thread Application/DevLogInfra/Sources/Service/UserServiceImpl.swift Outdated
@opficdev opficdev removed the qa TestFlight에 배포 label Jun 13, 2026
@opficdev opficdev merged commit 36723b3 into develop Jun 13, 2026
6 checks passed
@opficdev opficdev deleted the fix/#600-mac-login branch June 13, 2026 14:14
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.

맥에서 소셜 로그인이 안되는 현상을 해결한다

1 participant