Skip to content

Conversation

@wlgns12370
Copy link
Contributor

No description provided.

@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch develop

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

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

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@wlgns12370 wlgns12370 merged commit 9c76dda into prod Aug 12, 2025
4 of 5 checks passed
Copy link

@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.

Summary of Changes

Hello @wlgns12370, 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은 KMC 회원 및 카카오 사용자의 중복 회원가입 오류를 처리하기 위한 변경 사항을 포함합니다. 기존 모수 사용자가 전화번호를 통해 식별될 경우 OAuth 예외를 발생시키고, OAuth 로그인 실패 시 특정 오류 유형에 따라 적절한 응답을 반환하도록 오류 처리 로직을 개선합니다.

Highlights

  • 커스텀 OAuth 예외 도입: OAuth 관련 오류를 명확하게 처리하기 위해 새로운 OAuthException이 추가되었습니다.
  • 중복 회원가입 확인: OAuthUserPersistenceProcessor는 이제 전화번호로 기존 사용자를 찾을 때 해당 사용자가 이미 모수 회원인 경우 "DUPLICATE" 메시지와 함께 OAuthException을 발생시킵니다.
  • OAuth 로그인 실패 처리 개선: OAuth2LoginFailureHandler가 업데이트되어 다양한 OAuth 오류 유형(CANCELED, DUPLICATE, UNKNOWN)을 처리하고, 적절한 오류 코드를 포함하는 구조화된 OAuthFailureResponse를 반환합니다.
  • 새로운 오류 유형 Enum: OAuthErrorType enum이 추가되어 특정 오류 메시지를 미리 정의된 유형으로 분류하고 매핑합니다.
  • 새로운 실패 응답 레코드: OAuthFailureResponse 레코드가 도입되어 OAuth 로그인 실패 시 반환되는 응답 형식을 표준화합니다.
  • 사용되지 않는 LoginResponse 메서드 제거: LoginResponse 클래스에서 null 값을 반환하던 불필요한 from() 메서드가 제거되었습니다.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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

@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

안녕하세요. KMC 회원 및 카카오 중복 회원가입 에러 처리를 위한 변경사항 잘 보았습니다. 커스텀 예외와 실패 핸들러를 도입하여 OAuth 로그인 실패 로직을 체계적으로 구현하신 점이 좋습니다. 코드의 안정성과 유지보수성을 높일 수 있는 몇 가지 개선점을 제안드립니다.

Comment on lines +21 to +25
return switch (text) {
case "DUPLICATE" -> DUPLICATE;
case "[access_denied] User denied access" -> CANCELED;
default -> UNKNOWN;
};

Choose a reason for hiding this comment

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

high

현재 from 메소드는 예외 메시지 문자열 "[access_denied] User denied access"에 직접 의존하고 있어, Spring Security 버전 변경 등에 따라 메시지가 바뀌면 코드가 오작동할 위험이 있습니다. 보다 안정적인 방법은 OAuth2LoginFailureHandler에서 exception 객체의 타입을 확인하여 OAuth2AuthenticationException인 경우 getError().getErrorCode()를 통해 access_denied와 같은 에러 코드를 얻어오고, 그 코드를 이 from 메소드에 전달하는 것입니다. 이렇게 하면 외부 라이브러리의 메시지 변경에 영향을 받지 않는 견고한 코드를 만들 수 있습니다.

아래와 같이 from 메소드를 수정하고, OAuth2LoginFailureHandler도 함께 수정하는 것을 권장합니다.

OAuth2LoginFailureHandler.java 수정 예시:

String message = exception.getMessage();
if (exception instanceof org.springframework.security.oauth2.core.OAuth2AuthenticationException e) {
    message = e.getError().getErrorCode();
}
OAuthErrorType errorType = OAuthErrorType.from(message);
Suggested change
return switch (text) {
case "DUPLICATE" -> DUPLICATE;
case "[access_denied] User denied access" -> CANCELED;
default -> UNKNOWN;
};
return switch (text) {
case "DUPLICATE" -> DUPLICATE;
case "access_denied" -> CANCELED;
default -> UNKNOWN;
};

default -> UNKNOWN;
};
}
} No newline at end of file

Choose a reason for hiding this comment

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

medium

파일의 끝에 개행 문자가 없습니다. Java 코드 컨벤션 및 일부 도구와의 호환성을 위해 파일 끝에 개행 문자를 추가하는 것이 좋습니다.

Comment on lines +8 to +10
public static OAuthFailureResponse from(String errorCode) {
return new OAuthFailureResponse(null, errorCode);
}

Choose a reason for hiding this comment

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

medium

isProfileRegistered 필드에 null을 반환하는 것은 클라이언트 측에서 NullPointerException을 유발할 수 있습니다. 로그인 실패 시에는 프로필이 등록되지 않은 상태이므로, null 대신 false를 명시적으로 반환하여 API 응답의 명확성을 높이고 잠재적인 오류를 방지하는 것이 좋습니다.

Suggested change
public static OAuthFailureResponse from(String errorCode) {
return new OAuthFailureResponse(null, errorCode);
}
public static OAuthFailureResponse from(String errorCode) {
return new OAuthFailureResponse(false, errorCode);
}

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.

2 participants