Skip to content

fix(oauth): 카카오 oauth 응답에서 NullPointerException 문제 회피#284

Merged
huhdy32 merged 2 commits intodevelopfrom
fix/oauth
Jan 25, 2026
Merged

fix(oauth): 카카오 oauth 응답에서 NullPointerException 문제 회피#284
huhdy32 merged 2 commits intodevelopfrom
fix/oauth

Conversation

@huhdy32
Copy link
Collaborator

@huhdy32 huhdy32 commented Jan 25, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Improved Kakao authentication email handling to explicitly manage missing or indeterminate email-validation data, ensuring email is only used when fully eligible. Added logging for unavailable or ineligible cases to aid diagnosis and increase reliability of the login flow.

✏️ Tip: You can customize this high-level summary in your review settings.

@huhdy32 huhdy32 self-assigned this Jan 25, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @huhdy32, 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은 카카오 OAuth 응답 처리 로직의 견고성을 향상시키는 것을 목표로 합니다. 특정 상황에서 카카오로부터 받은 사용자 정보에 이메일 유효성 및 인증 상태 필드가 null로 올 수 있는데, 이로 인해 NullPointerException이 발생할 수 있었습니다. 이번 변경을 통해 이러한 예외를 사전에 방지하여 애플리케이션의 안정성을 높였습니다.

Highlights

  • 카카오 OAuth 응답 처리 개선: KakaoMemberInfoResponse 클래스에서 is_email_valid 및 is_email_verified 필드가 null일 경우 발생할 수 있는 NullPointerException을 방지하기 위해 getEmail() 메서드에 null 검사를 추가했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

@coderabbitai
Copy link

coderabbitai bot commented Jan 25, 2026

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

📝 Walkthrough

Walkthrough

The Account.getEmail() method in KakaoMemberInfoResponse was changed to explicitly handle nulls for is_email_valid and is_email_verified: it returns null if either flag is null, returns the email only when both flags are non-null and true, and logs cases where the email is ineligible.

Changes

Cohort / File(s) Summary
Kakao Member Info Response Enhancement
domain/mathrank-auth-domain/src/main/java/kr/co/mathrank/domain/auth/client/KakaoMemberInfoResponse.java
Added explicit null checks for is_email_valid and is_email_verified in Account.getEmail(); return null if either is null; require both to be true to return email; added logging for null/ineligible cases.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰 I hop through code with cautious feet,
Checking flags and nulls before I meet,
If valid and verified both are true,
I carry the email the whole way through,
Otherwise I log and quietly retreat.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: fixing a NullPointerException issue in Kakao OAuth response handling.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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

카카오 OAuth 응답에서 is_email_valid 또는 is_email_verified 필드가 null일 경우 발생할 수 있는 NullPointerException을 방지하기 위해 null 체크를 추가하신 것을 확인했습니다. 수정하신 코드는 문제를 올바르게 해결합니다. 다만, 코드의 가독성과 안정성을 높이기 위해 코드를 조금 더 간결하게 개선할 수 있는 제안을 드립니다.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In
`@domain/mathrank-auth-domain/src/main/java/kr/co/mathrank/domain/auth/client/KakaoMemberInfoResponse.java`:
- Around line 38-40: In KakaoMemberInfoResponse.getEmail, avoid logging the
entire Account (which may contain PII) when is_email_valid or is_email_verified
is false; change the log.info call to only emit non-PII flags (e.g.,
is_email_valid and is_email_verified) or a redacted placeholder instead of
logging "this" or the Account object, so locate the log.info in getEmail and
replace the message to not include raw email or Account contents.

@huhdy32 huhdy32 merged commit b7d9766 into develop Jan 25, 2026
2 checks passed
@huhdy32 huhdy32 deleted the fix/oauth branch January 25, 2026 08:21
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