Skip to content

Commit

Permalink
refactor : 로그인 에러 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
imenuuu committed May 20, 2024
1 parent db779d0 commit a2febcc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class AppleSocialLoginStrategy implements SocialLoginStrategy {
public User login(UserRequest.LoginUserDTO request) {
String identityToken = request.getAccessToken();
AppleMember appleMember = appleOAuthUserProvider.getApplePlatformMember(identityToken);
return userRepository.findBySocialIdAndSocialTypeAndStatus(appleMember.getSocialId(), SocialType.APPLE, Status.ACTIVE)
return userRepository.findBySocialIdAndSocialType(appleMember.getSocialId(), SocialType.APPLE)
.orElseGet(() -> UserConverter.toUser(appleMember));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class GoogleSocialLoginStrategy implements SocialLoginStrategy {
public User login(UserRequest.LoginUserDTO request) {
String identityToken = request.getAccessToken();
GoogleUserInfo googleUserInfo = googleOauth2Client.verifyToken(identityToken);
return userRepository.findBySocialIdAndSocialTypeAndStatus(googleUserInfo.getSub(), SocialType.GOOGLE, Status.ACTIVE)
return userRepository.findBySocialIdAndSocialType(googleUserInfo.getSub(), SocialType.GOOGLE)
.orElseGet(() -> UserConverter.toUser(googleUserInfo));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class KakaoSocialLoginStrategy implements SocialLoginStrategy{
public User login(UserRequest.LoginUserDTO request) {
String accessTokenWithBearerPrefix = "Bearer " + request.getAccessToken();
KakaoUserInfoDto kakaoUserInfoDto = kakaoFeignClient.getInfo(accessTokenWithBearerPrefix);
return userRepository.findBySocialIdAndSocialTypeAndStatus(kakaoUserInfoDto.getId(), SocialType.KAKAO, ACTIVE)
return userRepository.findBySocialIdAndSocialType(kakaoUserInfoDto.getId(), SocialType.KAKAO)
.orElseGet(() -> UserConverter.toUser(kakaoUserInfoDto));
}
}

0 comments on commit a2febcc

Please sign in to comment.