Skip to content

[#714] Apple 인증 자격 증명 처리를 서버 중심 구조로 전환한다#715

Merged
opficdev merged 3 commits into
developfrom
refactor/#714
Jul 11, 2026
Merged

[#714] Apple 인증 자격 증명 처리를 서버 중심 구조로 전환한다#715
opficdev merged 3 commits into
developfrom
refactor/#714

Conversation

@opficdev

Copy link
Copy Markdown
Owner

🔗 연관된 이슈

🎯 의도

  • Apple OAuth 자격 증명 처리 책임의 Firebase Functions 이전
  • iOS 책임을 Apple 인증 화면 표시, authorizationCode 수신, Firebase custom token 즉시 사용으로 축소
  • Apple 인증의 기존 앱 동작과 모듈 의존 방향 유지

📝 작업 내용

📌 요약

  • 서버 발급 hashedNonce를 사용하는 Apple challenge 인증 흐름으로 전환
  • Apple 로그인, 계정 연결·해제, grant 정리를 용도별 REST API로 전환
  • Apple provider 연결 해제 오류의 Data 및 Domain 오류 계약 추가
  • Apple 인증 저장소 흐름과 REST API 계약 검증 테스트 추가

🔍 상세

  • POST /auth/apple/challenges 응답의 hashedNonceASAuthorizationAppleIDRequest.nonce에 설정
  • challengeIdauthorizationCode만 사용하는 POST /auth/apple/custom-token 요청 구성
  • Firebase custom token 전용 응답 수신 후 FirebaseAuth 로그인에 즉시 사용
  • iOS의 rawNonce, identityToken, Apple access token, refresh token 처리 제거
  • 계정 연결을 PUT /auth/apple/account-link, 연결 해제를 DELETE /auth/apple/account-link로 전환
  • 계정 연결·해제 성공 후 currentUser.reload()를 통한 provider 상태 반영
  • 회원탈퇴 전 Apple grant 정리를 요청 본문 없는 DELETE /auth/apple/access-token으로 전환
  • Apple 인증 요청·응답 모델을 challenge, custom token, 계정 작업 용도별 계약으로 분리
  • Apple 서버의 provider 충돌과 마지막 provider 오류를 기존 AuthError로 변환
  • 로그인, 로그인 취소, 로그아웃, 회원탈퇴, 계정 연결·해제 저장소 흐름 테스트 추가
  • Apple REST 경로, HTTP method, 요청 인코딩 값, 서버 오류 분류 테스트 추가

📸 영상 / 이미지 (Optional)

  • 없음

@opficdev opficdev self-assigned this Jul 11, 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

이번 풀 리퀘스트는 Apple 로그인 및 계정 연결/연결 해제 프로세스를 챌린지-응답 방식으로 개선하고, 관련 에러 처리 및 단위 테스트를 보완하는 변경사항을 담고 있습니다. 리뷰에서는 Firestore에서 사용자 이름을 가져오거나 계정 연결 및 해제 후 로컬 사용자 상태를 갱신하는 과정에서 발생할 수 있는 네트워크 오류가 전체 인증 흐름을 실패하게 만들지 않도록, 예외 처리를 추가하여 안정성을 높일 것을 제안했습니다.

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.

@opficdev opficdev merged commit 5c70d38 into develop Jul 11, 2026
7 checks passed
@opficdev opficdev deleted the refactor/#714 branch July 11, 2026 09:19
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.

Apple 인증 자격 증명 처리를 서버 중심 구조로 전환한다

1 participant