Repository navigation
Feat/v2 guest auth - #364
Merged
Merged
Conversation
mise.toml은 4.202.0을 고정하고 있었으나 /usr/local/bin/tuist(3.33.3)가 PATH에서 mise shim보다 앞서, `tuist generate`가 매니페스트 컴파일 단계에서 `cannot find type 'DeploymentTargets'`로 실패하고 있었다. mise exec으로 감싸도 서브셸(sh Scripts/bootstrap.sh 등)에서는 여전히 구버전을 타므로, 우회법(PATH 직접 앞세우기)을 CLAUDE.md에 함께 기록한다. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
앱 시작 시 스플래시에서 멈추고 타임아웃되던 문제를 해결한다. 원인은 두 겹이었다.
겉: 앱이 바라보던 호스트가 둘 다 죽어 있었다. atcha.online은 DNS 등록이
사라졌고(NXDOMAIN), atcha.p-e.kr은 DNS는 남았으나 443 TCP 연결이 되지 않는다.
속: 서버가 소셜 로그인 기반에서 게스트 계정 기반으로 옮겨갔고 모든 경로에
/api 접두어가 붙었다. 앱이 호출하던 엔드포인트는 하나도 존재하지 않았다.
## 부트스트랩
토큰이 없으면 POST /auth/guest {deviceId, fcmToken?}로 JWT를 받아 세션에
채택하고 곧장 홈으로 간다(DefaultSignInAsGuestUseCase). 로그인 화면 단계가
사라졌다. 토큰 만료도 로그인 화면이 아니라 조용한 재인증으로 끝난다 —
reissue 실패 시 같은 deviceId로 /auth/guest를 다시 불러 같은 계정이 돌아온다.
## deviceId는 IDFV를 키체인에 고정한다
IDFV는 같은 개발사 앱을 전부 삭제한 뒤 재설치하면 값이 바뀐다. 게스트 모델에서
deviceId는 계정의 유일한 신원이므로, 그대로 쓰면 재설치 시 기존 계정의 알림
설정·검색 이력에 영구히 접근할 수 없게 된다. 최초 1회 읽은 값을 키체인에
고정해(앱 삭제 후에도 잔존) 재설치를 견딘다.
## 네트워크 진단
원인 추적에 시간이 걸린 이유는 스택 전체에 로깅이 0건이고, URLError가 전부
.transport로 뭉개져 타임아웃(-1001)·연결 불가(-1004)·TLS 실패(-1200)를 구분할
수 없었기 때문이다. NetworkError에 URLError 코드를 노출하고, DEBUG에서
com.atcha.network 서브시스템에 메서드·URL·상태코드·소요시간을 남긴다
(Authorization과 본문은 토큰이 실리므로 로깅하지 않는다).
부트스트랩이 비동기가 되면서 기존에 호출처가 없던 BootstrapFailureMessage와
SplashViewController.showRetry가 비로소 제 역할을 한다.
## 소셜 로그인은 보존
AuthFeature·SignInUseCase·SocialLoginAdapter·AppCoordinator.showLogin()은
호출처만 끊고 남겨뒀다(deprecated 표시). 계정 승격이 도입되면 그대로 진입점이
된다.
## 검증
- Debug·Stage·Release 3구성 빌드 성공
- Domain 100 / AtchaData 58 / AtchaV2 20 테스트 통과
- 초기화한 시뮬레이터 첫 실행에서 POST /api/auth/guest → 200, 홈 진입 확인
- 서버 계약 확인: 같은 deviceId 재호출 시 동일 계정(id) 반환
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
No description provided.