[6주차] 박승주/[feat] KAKAO OAuth2 인증/인가 구현 추가#118
Open
user040131 wants to merge 2 commits intoLeets-Official:박승주/mainfrom
Hidden character warning
The head ref may contain hidden characters: "\ubc15\uc2b9\uc8fc/6\uc8fc\ucc28"
Open
[6주차] 박승주/[feat] KAKAO OAuth2 인증/인가 구현 추가#118user040131 wants to merge 2 commits intoLeets-Official:박승주/mainfrom
user040131 wants to merge 2 commits intoLeets-Official:박승주/mainfrom
Conversation
eun-seoo
approved these changes
Nov 13, 2025
Member
There was a problem hiding this comment.
OAuth2 인증 후 처리 흐름을 SuccessHandler로 잘 분리해, 구조적으로 안정적인 설계를 하셨다는 부분이 인상 깊었습니다!
특히 Refresh Token을 보안 쿠키로 세심하게 설정하신 걸 보면서, 작은 디테일까지 잘 챙기신 코드라는 느낌이 들어서 많이 배우고 갑니다 😊
Comment on lines
+40
to
+49
| Object acc = attr.get("kakao_account"); | ||
| if (acc instanceof Map) { | ||
| Object profile = ((Map<?, ?>) acc).get("profile"); | ||
| if (profile instanceof Map) nickname = (String) ((Map<?, ?>) profile).get("nickname"); | ||
| else { | ||
| nickname = null; | ||
| } | ||
| } else { | ||
| nickname = null; | ||
| } |
Member
There was a problem hiding this comment.
kakao_account → profile → nickname 으로 이어지는 중첩 구조를
단순히 캐스팅하지 않고, instanceof 로 한 단계씩 꼼꼼하게 체크해준 점이 좋은 것 같습니다!
또, 카카오 OAuth 응답은 종종 필드가 빠져 있거나 null이 내려오는 경우가 있다고 하는데,
이런 구조적 불확실성을 잘 고려해 NPE를 사전에 확실히 방지한 안전한 파싱 로직이 인상적이었습니다!! 👍🏻👍🏻
gichanGim
reviewed
Nov 13, 2025
Comment on lines
+44
to
+45
| u.setId(userId); // 레퍼런스만 set | ||
| u.setNickname(profile_nickname); |
There was a problem hiding this comment.
User객체를 생성하고 내부 필드값을 세팅을 하고 있지만 이후 해당 생성된 객체를 사용하지 않는 것으로 보이는데 이렇게 작성하신 이유가 있을까요?
Contributor
Author
There was a problem hiding this comment.
해당 정적 메서드는 향후에 기존 User에 저장되어 있는 사용자와 UserSocial을 연동할 때 사용될 것으로 생각되어 제작한 메서드입니다. 아직 해당 기능은 구현하지 못해 참조없음으로 남겨두었습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
어떤 위험이나 장애를 발견했나요?
관련 스크린샷을 첨부해주세요.