Skip to content

[#242] 애플 계정의 링크 끊기가 실패하는 이슈를 해결한다#244

Merged
opficdev merged 5 commits intodevelopfrom
fix/#242-unlink-apple
Mar 10, 2026
Merged

[#242] 애플 계정의 링크 끊기가 실패하는 이슈를 해결한다#244
opficdev merged 5 commits intodevelopfrom
fix/#242-unlink-apple

Conversation

@opficdev
Copy link
Owner

@opficdev opficdev self-assigned this Mar 10, 2026
@opficdev opficdev merged commit ee7715e into develop Mar 10, 2026
1 check passed
@opficdev opficdev deleted the fix/#242-unlink-apple branch March 10, 2026 08:17
@gemini-code-assist
Copy link
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!

이 PR은 소셜 로그인 계정 연결 해제와 관련된 안정성을 향상시킵니다. 특히, Google 계정 연결 해제 과정에 명시적인 오류 처리 로직을 추가하여, 연결 해제 중 발생할 수 있는 모든 실패가 적절히 포착되고 로깅되며 전파되도록 보장합니다. 이는 잠재적인 무음 오류를 방지하고 디버깅 기능을 개선하는 데 도움이 됩니다.

Highlights

  • Google 계정 연결 해제 오류 처리 개선: Google 계정 연결 해제 과정에서 발생할 수 있는 오류를 명시적으로 처리하고 로깅하도록 unlink 메서드에 do-catch 블록이 추가되었습니다.
Changelog
  • DevLog/Infra/Service/SocialLogin/GoogleAuthenticationService.swift
    • unlink 메서드에 오류 처리 로직이 추가되었습니다.
Activity
  • 이슈 #242가 이 PR로 인해 닫혔습니다.
  • 현재까지 다른 활동은 기록되지 않았습니다.
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
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은 Apple, GitHub, Google 소셜 로그인 연동 해제 기능에 상세한 로깅과 에러 핸들링을 추가하여 안정성을 높였습니다. 특히 실패 케이스에 대한 디버깅이 용이해질 것으로 보입니다. 코드 리뷰 중, Apple 및 GitHub 연동 해제 로직에서 잠재적인 문제를 발견했습니다. Firestore에서 토큰을 삭제하는 작업이 Firebase provider 연결 해제보다 먼저 수행되고 있어, 만약 provider 연결 해제가 실패할 경우 사용자가 복구 불가능한 상태에 빠질 위험이 있습니다. 이에 대한 수정 제안을 댓글로 남겼습니다. 이 부분을 수정하면 더욱 안정적인 연동 해제 기능을 구현할 수 있을 것입니다.

I am having trouble creating individual review comments. Click here to see my feedback.

DevLog/Infra/Service/SocialLogin/AppleAuthenticationService.swift (159-167)

high

현재 로직에서는 Firestore에서 appleRefreshToken을 삭제한 후에 Firebase provider 연결을 끊고 있습니다. 만약 user?.unlink(...) 호출이 실패하면, 재시도 시 refreshAppleAccessToken 호출이 실패하여 사용자가 계정 연결을 해제할 수 없는 상태에 빠질 수 있습니다. appleRefreshToken 삭제는 user?.unlink가 성공한 후에 수행하는 것이 더 안전합니다. 작업 순서를 변경하는 것을 제안합니다.

            logger.info("Starting Firebase Apple provider unlink. uid: \(uid)")
            _ = try await user?.unlink(fromProvider: providerID.rawValue)

            if doc.exists {
                logger.info("Starting Apple refresh token deletion from Firestore for unlink. uid: \(uid)")
                try await tokensRef.updateData([
                    "appleRefreshToken": FieldValue.delete()
                ])
            }

DevLog/Infra/Service/SocialLogin/GithubAuthenticationService.swift (135-139)

high

Apple 로그인과 마찬가지로, Firestore에서 githubAccessToken을 삭제한 후에 Firebase provider 연결을 끊고 있습니다. user?.unlink(...) 호출이 실패하면, 재시도 시 revokeAccessToken이 토큰을 찾지 못해 실패할 수 있습니다. 이로 인해 사용자가 계정 연결을 해제할 수 없는 상태가 될 수 있습니다. githubAccessToken 삭제는 user?.unlink가 성공한 후에 수행하도록 순서를 변경하는 것이 좋습니다.

            logger.info("Starting Firebase GitHub provider unlink. uid: \(uid)")
            _ = try await user?.unlink(fromProvider: providerID.rawValue)

            logger.info("Starting GitHub access token deletion from Firestore for unlink. uid: \(uid)")
            try await tokensRef.updateData(["githubAccessToken": FieldValue.delete()])

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