Skip to content

[Feat] 소셜 로그인 운영 설정 연결 - #112

Merged
MinHeokChoi merged 1 commit into
mainfrom
feat/#111-social-login-release-config
Jul 28, 2026
Merged

[Feat] 소셜 로그인 운영 설정 연결#112
MinHeokChoi merged 1 commit into
mainfrom
feat/#111-social-login-release-config

Conversation

@MinHeokChoi

@MinHeokChoi MinHeokChoi commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

✨ PR 유형

  • 새로운 기능 추가
  • 빌드 부분 혹은 패키지 매니저 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링

🛠️ 작업내용

  • Google iOS client ID·reversed URL scheme·Web client ID/backend audience를 Debug/Release 공개 설정에 연결했습니다.
  • Kakao Native app key와 정확한 callback scheme을 연결하고 기존 strict configuration gate를 활성화했습니다.
  • Apple provider gate를 활성화하고 bundle ID·Team ID·Sign in with Apple entitlement를 실제 provisioning profile에서 검증했습니다. Apple Key ID는 앱 런타임에 넣지 않고 서버 준비 metadata로만 기록했습니다.
  • 메인·개인정보처리방침·이용약관·고객지원 URL을 연결하고 team-moru.github.io의 HTTPS exact route만 허용합니다.
  • 운영 설정이 준비된 경우 provider UI가 활성화되며, guest/local-first 경로와 로컬 데이터 우선 계약은 그대로 유지됩니다.
  • Figma 기준을 file vrVBDLEy0UmqlLVfxnUcY9, node 2644:2751로 manifest에 고정했습니다.

검증:

  • 관련 signed XCTest: 36 passed, 0 failed/skipped
  • 전체 signed XCTest: 396 passed, 0 failed/skipped/expected failure
  • 운영 visual test: 1 passed, 8상태 × Medium/AX3 × repeat 32 PNG deterministic
  • iPhone 16 Simulator Debug: 성공
  • generic iPhone Debug/Release: 실제 Apple Development provisioning으로 성공
  • source/built Info.plist·entitlement plutil 및 callback/config exact 검증: 통과
  • iPhone functional gate·SwiftData boundary gate·신규 release config gate·git diff check: 통과
  • 운영 URL 4개 HTTPS 200, private key/client secret/admin key/금지 범위 scan: clean
  • SwiftData schema/migration, Local Repository, Routine Domain 변경: 0건

📋 추후 진행 상황

  • Figma API/PNG 접근을 복구해 node 2644:2751의 before/after/overlay를 완료합니다. 현재 pixel-match 완료로 주장하지 않습니다.
  • 실제 iPhone에서 Google·Kakao·Apple 성공·취소·callback·재실행·로그아웃·탈퇴 E2E를 수행합니다.
  • Google backend audience, Apple raw nonce/revoke, Kakao backend token/logout/unlink를 실서버에서 검증합니다.

📌 리뷰 포인트

  • 공개 식별자와 callback scheme 정합성, 실제 비밀 값이 저장되지 않은 것을 확인해 주세요.
  • 정책 URL exact host/path allowlist와 provider 활성 gate를 확인해 주세요.
  • Apple capability가 실제 provisioning profile에서 포함되는지 확인해 주세요.
  • 운영 설정 활성화 뒤에도 guest/local-first 경로가 유지되는지 확인해 주세요.

✅ Checklist

  • 커밋 메시지 컨벤션에 맞게 작성했습니다
  • 유지-보수를 위해 필요한 계약 주석을 작성했습니다

Refs #111

Summary by CodeRabbit

  • New Features

    • Enabled configured Apple, Google, and Kakao sign-in options for release builds.
    • Added “MORU 홈” and “고객지원” links alongside privacy and terms links.
    • Improved VoiceOver navigation across account-entry policy links.
  • Bug Fixes

    • Strengthened policy-link validation to allow only approved secure URLs.
    • Improved handling and diagnostics for Apple and social-login failures.
  • Documentation

    • Updated release-readiness guidance for social login and account-entry configuration.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@MinHeokChoi, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 43 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: c89d083f-6ac8-4ee0-9980-356269d528a5

📥 Commits

Reviewing files that changed from the base of the PR and between dcc178e and 97b9895.

📒 Files selected for processing (18)
  • Moru/Info.plist
  • Moru/Moru.xcodeproj/project.pbxproj
  • Moru/Moru/Features/AccountEntry/AccountEntryView.swift
  • Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift
  • Moru/Moru/Features/Profile/AppleLoginReadiness.swift
  • Moru/Moru/Features/Profile/SocialLoginCoordinator.swift
  • Moru/MoruTests/AppleAccountLinkingTests.swift
  • Moru/MoruTests/GoogleAccountLinkingTests.swift
  • Moru/MoruTests/OptionalLoginEntryTests.swift
  • Moru/MoruTests/OptionalLoginEntryVisualTests.swift
  • Moru/MoruTests/SocialLoginFoundationTests.swift
  • Moru/docs/AppleLoginReadiness.md
  • Moru/docs/GoogleLoginReadiness.md
  • Moru/docs/KakaoLoginReadiness.md
  • Moru/docs/OptionalLoginEntryReadiness.md
  • Moru/docs/SocialLoginReleaseConfiguration.md
  • Scripts/check-social-login-release-config.sh
  • mydocs/moru-ios-v2-social-login-context.md
📝 Walkthrough

Walkthrough

The PR connects concrete social-login release settings, adds strict four-route policy validation, introduces structured Apple and social-login failure reporting, expands flow tests, and adds automated configuration checks plus release-readiness documentation.

Changes

Social login release readiness

Layer / File(s) Summary
Policy URL configuration and login entry
Moru/Info.plist, Moru/Moru.xcodeproj/project.pbxproj, Moru/Moru/Features/AccountEntry/AccountEntryView.swift, Moru/MoruTests/OptionalLoginEntry*, Moru/MoruTests/SocialLoginFoundationTests.swift
Debug and Release settings use concrete provider identifiers and URLs. Account-entry policy validation now requires four allowlisted HTTPS routes, renders home/support links, and updates accessibility ordering and tests.
Apple authorization failure reporting
Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift, Moru/Moru/Features/Profile/AppleLoginReadiness.swift, Moru/MoruTests/AppleAccountLinkingTests.swift
Apple credential, authorization, and missing-context failures are categorized, reported through injected reporters, and validated with recording-based tests.
Social login diagnostics
Moru/Moru/Features/Profile/SocialLoginCoordinator.swift, Moru/MoruTests/GoogleAccountLinkingTests.swift
Remote exchange and session-storage errors produce sanitized diagnostics while preserving original errors; Google tests cover diagnostic stages, codes, and sensitive-data exclusion.
Release verification and documentation
Scripts/check-social-login-release-config.sh, Moru/docs/*LoginReadiness.md, Moru/docs/SocialLoginReleaseConfiguration.md, mydocs/moru-ios-v2-social-login-context.md
A script validates build settings, bundle identifiers, plist substitutions, callback schemes, forbidden metadata, and Apple entitlements; readiness and QA records document configuration and remaining verification scope.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • #111 — Adds the production social-login configuration, policy URL wiring, validation script, and related documentation.
  • #105 — Configures Google client IDs and callback values with release-readiness tests and gates.
  • #107 — Updates Kakao public identifiers, callback schemes, and provider gating.
  • #101 — Extends social-login infrastructure with production configuration and structured Apple/Google/Kakao failure handling.

Sequence Diagram(s)

sequenceDiagram
  participant SocialLoginCoordinator
  participant AuthRemoteDataSource
  participant AccountSessionStore
  participant FailureReporter
  SocialLoginCoordinator->>AuthRemoteDataSource: Submit provider credentials
  AuthRemoteDataSource-->>SocialLoginCoordinator: Return credentials or remote error
  SocialLoginCoordinator->>FailureReporter: Report remote exchange diagnostic
  SocialLoginCoordinator->>AccountSessionStore: Establish account session
  AccountSessionStore-->>SocialLoginCoordinator: Return success or storage error
  SocialLoginCoordinator->>FailureReporter: Report session storage diagnostic
Loading
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 소셜 로그인 운영 설정 연결이라는 핵심 변경을 간결하게 잘 요약합니다.
Description check ✅ Passed 템플릿의 PR 유형, 작업내용, 추후 진행 상황, 리뷰 포인트, 체크리스트를 모두 포함해 대부분 충족합니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/#111-social-login-release-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@MinHeokChoi
MinHeokChoi force-pushed the feat/#109-optional-login-entry branch from 2c5425b to ee508a5 Compare July 28, 2026 03:25
MinHeokChoi added a commit that referenced this pull request Jul 28, 2026
Google·Kakao 공개 설정과 callback, Apple capability, 정책 URL, 실패 진단을 운영 경계에 고정한다.

Constraint: 클라이언트에는 공개 식별자만 포함하고 provider secret과 서버 자격 증명은 저장하지 않는다
Rejected: 이전 stacked parent 이력을 유지 | #110 squash merge 뒤 중복 diff와 충돌 상태를 남긴다
Confidence: high
Scope-risk: moderate
Directive: OAuth 서버 설정과 secret은 iOS 저장소 밖에서 관리하고 provider 계약 변경 시 실제 기기 E2E를 다시 수행한다
Tested: original #112 tree equivalence, social login release configuration gate, iPhone functional gate, SwiftData boundary, git diff check
Not-tested: fresh GitHub CI and post-merge main checks
External-verified: server redeploy 후 실제 iPhone 로그인 및 재실행 세션 유지 사용자 확인
@MinHeokChoi
MinHeokChoi force-pushed the feat/#111-social-login-release-config branch from 64b2c3d to dcc178e Compare July 28, 2026 04:15
@MinHeokChoi
MinHeokChoi changed the base branch from feat/#109-optional-login-entry to main July 28, 2026 04:15
@MinHeokChoi
MinHeokChoi marked this pull request as ready for review July 28, 2026 04:16
Google·Kakao 공개 설정과 callback, Apple capability, 정책 URL, 실패 진단을 운영 경계에 고정한다.

Constraint: 클라이언트에는 공개 식별자만 포함하고 provider secret과 서버 자격 증명은 저장하지 않는다
Rejected: 이전 stacked parent 이력을 유지 | #110 squash merge 뒤 중복 diff와 충돌 상태를 남긴다
Confidence: high
Scope-risk: moderate
Directive: OAuth 서버 설정과 secret은 iOS 저장소 밖에서 관리하고 provider 계약 변경 시 실제 기기 E2E를 다시 수행한다
Tested: original #112 tree equivalence, social login release configuration gate, iPhone functional gate, SwiftData boundary, git diff check
Not-tested: fresh GitHub CI and post-merge main checks
External-verified: server redeploy 후 실제 iPhone 로그인 및 재실행 세션 유지 사용자 확인
@MinHeokChoi
MinHeokChoi force-pushed the feat/#111-social-login-release-config branch from dcc178e to 97b9895 Compare July 28, 2026 04:22
@MinHeokChoi
MinHeokChoi merged commit d56d244 into main Jul 28, 2026
5 of 6 checks passed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
Moru/Moru/Features/Profile/SocialLoginCoordinator.swift (1)

130-143: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

SocialLoginFailureLogger drops all diagnostics outside DEBUG.

The elaborate sanitization in SocialLoginFailureDiagnostic (safe server code, safe provider name) exists precisely to make failure info safe to log, but report(_:) is gated by #if DEBUG, so Release/TestFlight builds get zero telemetry for social login failures — exactly the real-device failures this PR defers to post-release verification.

If there isn't a separate production logging/analytics path already covering this, consider logging unconditionally since the message is already sanitized.

♻️ Possible fix
   func report(_ diagnostic: SocialLoginFailureDiagnostic) {
-    `#if` DEBUG
     logger.error(
       "Social login failed: \(diagnostic.logMessage, privacy: .public)"
     )
-    `#endif`
   }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Moru/Moru/Features/Profile/SocialLoginCoordinator.swift` around lines 130 -
143, Update SocialLoginFailureLogger.report(_:) to emit the sanitized
SocialLoginFailureDiagnostic.logMessage unconditionally, removing the DEBUG-only
compilation guard so Release and TestFlight builds retain social-login failure
telemetry.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Moru/Moru/Features/AccountEntry/AccountEntryView.swift`:
- Around line 502-537: Update the accessibilitySortPriority values on the
policyLink entries in AccountEntryView so they do not collide with
continueWithoutLoginButton or kakaoButton. Assign unique fractional priorities
that place mainIdentifier after the guest button and privacyIdentifier after
mainIdentifier, while preserving the existing termsIdentifier and
supportIdentifier order and the canonical voiceOverOrder.

In `@Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift`:
- Around line 60-74: Update AppleAuthorizationFailureLogger.report(_:) to emit
the sanitized logger.error message in all build configurations by removing the
DEBUG-only compilation guard, while preserving the existing logMessage and
public privacy setting.

---

Nitpick comments:
In `@Moru/Moru/Features/Profile/SocialLoginCoordinator.swift`:
- Around line 130-143: Update SocialLoginFailureLogger.report(_:) to emit the
sanitized SocialLoginFailureDiagnostic.logMessage unconditionally, removing the
DEBUG-only compilation guard so Release and TestFlight builds retain
social-login failure telemetry.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d890d8d9-58e9-418d-bfda-725691a3740c

📥 Commits

Reviewing files that changed from the base of the PR and between d3a8ba1 and dcc178e.

📒 Files selected for processing (18)
  • Moru/Info.plist
  • Moru/Moru.xcodeproj/project.pbxproj
  • Moru/Moru/Features/AccountEntry/AccountEntryView.swift
  • Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift
  • Moru/Moru/Features/Profile/AppleLoginReadiness.swift
  • Moru/Moru/Features/Profile/SocialLoginCoordinator.swift
  • Moru/MoruTests/AppleAccountLinkingTests.swift
  • Moru/MoruTests/GoogleAccountLinkingTests.swift
  • Moru/MoruTests/OptionalLoginEntryTests.swift
  • Moru/MoruTests/OptionalLoginEntryVisualTests.swift
  • Moru/MoruTests/SocialLoginFoundationTests.swift
  • Moru/docs/AppleLoginReadiness.md
  • Moru/docs/GoogleLoginReadiness.md
  • Moru/docs/KakaoLoginReadiness.md
  • Moru/docs/OptionalLoginEntryReadiness.md
  • Moru/docs/SocialLoginReleaseConfiguration.md
  • Scripts/check-social-login-release-config.sh
  • mydocs/moru-ios-v2-social-login-context.md

Comment on lines +502 to +537
policyLink(
title: "MORU 홈",
url: policyConfiguration.mainURL,
identifier: AccountEntryAccessibility.mainIdentifier
)
.accessibilitySortPriority(3)

policyLink(
title: "개인정보처리방침",
url: policyConfiguration.privacyPolicyURL,
identifier: AccountEntryAccessibility.privacyIdentifier
)
.accessibilitySortPriority(1)
.accessibilitySortPriority(2)
}

HStack(spacing: MoruPilotSpacing.sixteen) {
policyLink(
title: "이용약관",
url: policyConfiguration.termsOfServiceURL,
identifier: AccountEntryAccessibility.termsIdentifier
)
.accessibilitySortPriority(1)

policyLink(
title: "고객지원",
url: policyConfiguration.supportURL,
identifier: AccountEntryAccessibility.supportIdentifier
)
.accessibilitySortPriority(0)
}

if policyConfiguration.privacyPolicyURL == nil
|| policyConfiguration.termsOfServiceURL == nil {
Text("공개 정책 URL이 준비되지 않아 현재 빌드에서는 링크를 열 수 없어요.")
if !policyConfiguration.isReady {
Text(
"공개 웹 URL이 준비되지 않아 현재 빌드에서는 "
+ "링크를 열 수 없어요."
)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

VoiceOver order regression: duplicate accessibilitySortPriority values.

mainIdentifier link gets priority 3, colliding with the pre-existing kakaoButton priority 3 (line 369); privacyIdentifier link gets priority 2, colliding with the pre-existing continueWithoutLoginButton priority 2 (line 257). Since priority values are compared globally (not per-nested-container) within the single .accessibilityElement(children: .contain) root, main(3) will always be announced before guest(2) — the actual VoiceOver order becomes ... kakao → main → guest → privacy ..., which contradicts the documented/tested canonical order ... kakao → guest → main → privacy ... in AccountEntryAccessibility.voiceOverOrder. testAccessibilityIdentifiersAreUniqueAndVoiceOverOrderIsStable only checks the static array, not this runtime wiring, so it doesn't catch the mismatch.

Renumber to eliminate collisions and preserve the intended order:

♿️ Proposed fix
       HStack(spacing: MoruPilotSpacing.sixteen) {
         policyLink(
           title: "MORU 홈",
           url: policyConfiguration.mainURL,
           identifier: AccountEntryAccessibility.mainIdentifier
         )
-        .accessibilitySortPriority(3)
+        .accessibilitySortPriority(1.75)

         policyLink(
           title: "개인정보처리방침",
           url: policyConfiguration.privacyPolicyURL,
           identifier: AccountEntryAccessibility.privacyIdentifier
         )
-        .accessibilitySortPriority(2)
+        .accessibilitySortPriority(1.5)
       }

       HStack(spacing: MoruPilotSpacing.sixteen) {
         policyLink(
           title: "이용약관",
           url: policyConfiguration.termsOfServiceURL,
           identifier: AccountEntryAccessibility.termsIdentifier
         )
-        .accessibilitySortPriority(1)
+        .accessibilitySortPriority(1.25)

         policyLink(
           title: "고객지원",
           url: policyConfiguration.supportURL,
           identifier: AccountEntryAccessibility.supportIdentifier
         )
-        .accessibilitySortPriority(0)
+        .accessibilitySortPriority(1)
       }

(continueWithoutLoginButton stays at 2, kakaoButton stays at 3 — the fractional values above just slot the policy links strictly between them without colliding with either.)

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
policyLink(
title: "MORU 홈",
url: policyConfiguration.mainURL,
identifier: AccountEntryAccessibility.mainIdentifier
)
.accessibilitySortPriority(3)
policyLink(
title: "개인정보처리방침",
url: policyConfiguration.privacyPolicyURL,
identifier: AccountEntryAccessibility.privacyIdentifier
)
.accessibilitySortPriority(1)
.accessibilitySortPriority(2)
}
HStack(spacing: MoruPilotSpacing.sixteen) {
policyLink(
title: "이용약관",
url: policyConfiguration.termsOfServiceURL,
identifier: AccountEntryAccessibility.termsIdentifier
)
.accessibilitySortPriority(1)
policyLink(
title: "고객지원",
url: policyConfiguration.supportURL,
identifier: AccountEntryAccessibility.supportIdentifier
)
.accessibilitySortPriority(0)
}
if policyConfiguration.privacyPolicyURL == nil
|| policyConfiguration.termsOfServiceURL == nil {
Text("공개 정책 URL이 준비되지 않아 현재 빌드에서는 링크를 열 수 없어요.")
if !policyConfiguration.isReady {
Text(
"공개 웹 URL이 준비되지 않아 현재 빌드에서는 "
+ "링크를 열 수 없어요."
)
policyLink(
title: "MORU 홈",
url: policyConfiguration.mainURL,
identifier: AccountEntryAccessibility.mainIdentifier
)
.accessibilitySortPriority(1.75)
policyLink(
title: "개인정보처리방침",
url: policyConfiguration.privacyPolicyURL,
identifier: AccountEntryAccessibility.privacyIdentifier
)
.accessibilitySortPriority(1.5)
}
HStack(spacing: MoruPilotSpacing.sixteen) {
policyLink(
title: "이용약관",
url: policyConfiguration.termsOfServiceURL,
identifier: AccountEntryAccessibility.termsIdentifier
)
.accessibilitySortPriority(1.25)
policyLink(
title: "고객지원",
url: policyConfiguration.supportURL,
identifier: AccountEntryAccessibility.supportIdentifier
)
.accessibilitySortPriority(1)
}
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Moru/Moru/Features/AccountEntry/AccountEntryView.swift` around lines 502 -
537, Update the accessibilitySortPriority values on the policyLink entries in
AccountEntryView so they do not collide with continueWithoutLoginButton or
kakaoButton. Assign unique fractional priorities that place mainIdentifier after
the guest button and privacyIdentifier after mainIdentifier, while preserving
the existing termsIdentifier and supportIdentifier order and the canonical
voiceOverOrder.

Comment on lines +60 to +74
nonisolated struct AppleAuthorizationFailureLogger:
AppleAuthorizationFailureReporting {
private let logger = Logger(
subsystem: Bundle.main.bundleIdentifier ?? "com.teammoru.Moru",
category: "AppleAuthorization"
)

func report(_ reason: AppleAuthorizationFailureReason) {
#if DEBUG
logger.error(
"Apple authorization failed: \(reason.logMessage, privacy: .public)"
)
#endif
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Locate target file =="
git ls-files | grep -F 'AppleAuthorizationAdapter.swift' || true

echo "== Target file excerpt =="
if [ -f "Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift" ]; then
  cat -n "Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift" | sed -n '1,120p'
fi

echo "== Search logMessage / failure reason usages =="
rg -n "AppleAuthorizationFailureReporting|AppleAuthorizationFailureLogger|logMessage|report\\(" -S . --glob '*.swift' | head -200

echo "== Search DEBUG guard logging patterns around reported APIs =="
rg -n "`#if` DEBUG|Logger\\(|\\.error\\(|report\\(" -S Moru/Moru --glob '*.swift' | head -200

Repository: Team-Moru/moru-iOS

Length of output: 11915


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Apple Authorization failure call sites =="
cat -n "Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift" | sed -n '118,240p'
cat -n "Moru/Moru/Features/Profile/AppleLoginReadiness.swift" | sed -n '80,145p'

echo "== Existing failure reporter defaults =="
cat -n "Moru/Moru/Features/Profile/SocialLoginCoordinator.swift" | sed -n '120,155p'

echo "== Project build configs mentioning DEBUG/RELEASE/Xcframework =="
grep -RInE -i "DEBUG|RELEASE|Default Configuration|build configuration|xcconfig|enableUserInteraction|archive" . \
  --include='*.xcodeproj' --include='*.xcworkspace' --include='*.plist' --include='*.xcconfig' --include='*.swift' \
  | head -200

echo "== README/docs mentions of diagnostics/logs/production QA =="
grep -RInE -i "qa|real device|qa note|credential|authorization|diagn|log|production|release|sysdiagnose|console" . \
  --include='*.md' --include='*.txt' --include='*.plist' --include='*.swift' \
  | head -300

Repository: Team-Moru/moru-iOS

Length of output: 45496


Log Apple authorization failures outside DEBUG-only guards.

failed(_:) only calls failureReporter.report(...), and AppleAuthorizationFailureLogger.report(_:) compiles the logger.error(...) call out of Release builds because it is wrapped in #if DEBUG. Since logMessage is already sanitized and uses privacy: .public, these structured Apple auth failures won’t appear in Release/TestFlight/App Store logs; log them unconditionally or through a Release-visible OS log channel.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Moru/Moru/Features/Profile/AppleAuthorizationAdapter.swift` around lines 60 -
74, Update AppleAuthorizationFailureLogger.report(_:) to emit the sanitized
logger.error message in all build configurations by removing the DEBUG-only
compilation guard, while preserving the existing logMessage and public privacy
setting.

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