Skip to content

[#266] 여러 공급자가 연결되어 있는 계정을 회원탈퇴 시 오류가 발생하는 이슈를 해결한다#267

Merged
opficdev merged 3 commits intodevelopfrom
fix/266-multiple-providers
Mar 12, 2026
Merged

[#266] 여러 공급자가 연결되어 있는 계정을 회원탈퇴 시 오류가 발생하는 이슈를 해결한다#267
opficdev merged 3 commits intodevelopfrom
fix/266-multiple-providers

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev self-assigned this Mar 12, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 Pull Request는 여러 공급자가 연결된 계정의 회원 탈퇴 시 발생하던 오류를 해결하기 위해 사용자 삭제 프로세스를 개선합니다. Firestore 데이터 정리 로직을 서버 측 Firebase Cloud Function으로 옮겨 사용자 인증 삭제 시 데이터가 자동으로 안전하게 제거되도록 합니다. 또한, 다양한 인증 및 데이터 서비스 함수 전반에 걸쳐 비동기 작업에 대한 오류 처리를 강화하고 오류 로깅을 개선하여 애플리케이션의 안정성과 디버깅 용이성을 향상시켰습니다.

Highlights

  • 사용자 삭제 로직 개선: Firestore 사용자 데이터 삭제 로직이 클라이언트(AuthenticationRepositoryImpl, AuthService)에서 제거되고, Firebase Authentication 사용자 삭제 시 자동으로 트리거되는 서버 측 Firebase Cloud Function으로 이전되었습니다. 이는 계정 탈퇴 시 여러 공급자가 연결되어 있을 때 발생하던 오류를 해결하고 데이터 정리의 견고성을 높입니다.
  • 포괄적인 오류 처리 추가: 다양한 비동기 작업(AuthService, PushNotificationService, AppleAuthenticationService, GithubAuthenticationService, GoogleAuthenticationService, UserService)에 try-catch 블록이 추가되어 오류 발생 시 이를 적절히 처리하고 로깅하도록 개선되었습니다. 이는 애플리케이션의 안정성을 높이고 디버깅을 용이하게 합니다.
  • 로거 기능 강화: Logger 유틸리티가 오류를 로깅할 때 error.localizedDescription 대신 전체 error 객체를 기록하도록 변경되어, 더 상세한 오류 정보를 제공합니다.
  • Firebase Cloud Function 업데이트: 사용자 데이터 정리 Cloud Function이 HTTPS onCall 함수(deleteUserFirestoreData)에서 Auth onDelete 트리거(cleanupDeletedUserFirestoreData)로 변경되어, Firebase Authentication에서 사용자가 삭제될 때 Firestore 데이터가 자동으로 정리됩니다.
Changelog
  • DevLog/Data/Repository/AuthenticationRepositoryImpl.swift
    • 계정 삭제 시 Firestore 사용자 데이터를 직접 삭제하는 호출을 제거했습니다.
  • DevLog/Infra/Common/Logger.swift
    • 오류 로깅 시 localizedDescription 대신 전체 오류 객체를 포함하도록 업데이트했습니다.
  • DevLog/Infra/Service/AuthService.swift
    • FirebaseFunctions 임포트 및 클라이언트 측 Firestore 사용자 데이터 삭제 함수를 제거했습니다.
    • 사용자 삭제 및 로그아웃 프로세스에 포괄적인 오류 처리를 추가했습니다.
  • DevLog/Infra/Service/PushNotificationService.swift
    • 모든 비동기 데이터 작업에 try-catch 블록과 로깅을 포함한 강력한 오류 처리를 구현했습니다.
  • DevLog/Infra/Service/SocialLogin/AppleAuthenticationService.swift
    • 로그아웃, 계정 삭제 및 연결 작업에 try-catch 블록과 로깅을 통해 오류 처리를 강화했습니다.
  • DevLog/Infra/Service/SocialLogin/GithubAuthenticationService.swift
    • 로그아웃 및 계정 삭제 작업에 try-catch 블록과 로깅을 추가했습니다.
  • DevLog/Infra/Service/SocialLogin/GoogleAuthenticationService.swift
    • 로그아웃, 계정 삭제 및 연결 작업에 try-catch 블록과 로깅을 통합했습니다.
  • DevLog/Infra/Service/UserService.swift
    • upsertUser 함수의 비동기 작업을 try-catch 블록으로 감싸 오류 처리를 개선했습니다.
  • Firebase/functions/src/index.ts
    • 사용자 데이터 정리 함수의 이름 변경을 반영하여 임포트 및 익스포트 문을 업데이트했습니다.
  • Firebase/functions/src/user/delete.ts
    • 사용자 데이터 삭제 함수를 onCall HTTPS 함수에서 Auth onDelete 트리거로 리팩토링하여, 사용자 삭제 시 Firestore 데이터 정리를 자동화했습니다.
Activity
  • 이 Pull Request는 이슈 #266을 해결했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Code Review

이번 PR은 여러 소셜 로그인 공급자가 연결된 계정을 탈퇴할 때 발생하는 오류를 해결하기 위한 변경 사항들을 포함하고 있습니다. 가장 핵심적인 변경은 클라이언트에서 직접 Firestore 데이터를 삭제하는 대신, Firebase Authentication 사용자 삭제 시 자동으로 트리거되는 Cloud Function(onDelete)을 사용하도록 백엔드 로직을 수정한 것입니다. 이 접근 방식은 계정 삭제 프로세스를 훨씬 더 안정적이고 견고하게 만듭니다.

또한, PR 전반에 걸쳐 do-catch 블록을 사용하여 오류 로깅을 대폭 강화한 점이 인상적입니다. 이는 향후 발생할 수 있는 문제들을 신속하게 진단하고 디버깅하는 데 큰 도움이 될 것입니다. Logger 구현에서 error.localizedDescription 대신 error를 직접 사용하도록 변경하여 더 상세한 오류 정보를 얻을 수 있도록 한 것도 좋은 개선입니다.

전반적으로 문제의 근본 원인을 정확히 파악하고, 모범 사례에 따라 수정한 훌륭한 PR이라고 생각합니다. 한 가지 작은 개선 제안을 리뷰 코멘트로 남겼으니 확인 부탁드립니다.

Comment thread Firebase/functions/src/user/delete.ts
@opficdev opficdev merged commit 3945073 into develop Mar 12, 2026
3 of 4 checks passed
@opficdev opficdev deleted the fix/266-multiple-providers branch March 12, 2026 08:49
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