Skip to content

Commit

Permalink
fix: 카카오 개인 정보 반환 시 이름, 닉네임은 반환하지 않도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jaeuk520 committed Oct 1, 2024
1 parent bd45aa9 commit 1f6de76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class)
public record KakaoUserInfoResponse(KakaoAccount kakaoAccount){

public record KakaoAccount(String name, String email, Profile profile) {
public record Profile (String nickname, String thumbnail_image_url) { }
public record KakaoAccount(String email, Profile profile) {
public record Profile (String thumbnail_image_url) { }

}

public Member toEntity() {
return Member.builder()
.email(kakaoAccount.email)
.nickname(kakaoAccount.profile.nickname)
.imageUrl(kakaoAccount.profile.thumbnail_image_url)
.password(null)
.platform(Platform.KAKAO)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void getUserInfo() throws JsonProcessingException {

KakaoUserInfoResponse response =
new KakaoUserInfoResponse(
new KakaoUserInfoResponse.KakaoAccount("name", kakaoEmail,
new KakaoUserInfoResponse.KakaoAccount.Profile("nickname", "image")));
new KakaoUserInfoResponse.KakaoAccount(kakaoEmail,
new KakaoUserInfoResponse.KakaoAccount.Profile("image")));

server.expect(requestTo(KAKAO_USER_INFO_URL))
.andExpect(content().contentType("application/x-www-form-urlencoded"))
Expand Down

0 comments on commit 1f6de76

Please sign in to comment.