Skip to content

Commit ff02e20

Browse files
2 parents dad5a95 + af957e2 commit ff02e20

1 file changed

Lines changed: 2 additions & 10 deletions

File tree

src/main/java/com/back/web7_9_codecrete_be/domain/auth/service/AuthService.java

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,7 @@ public LoginResponse kakaoLogin(String code) {
143143
}
144144

145145
// 3. 소셜 ID 기준 사용자 조회
146-
User user = userRepository
147-
.findBySocialTypeAndSocialId(
148-
SocialType.KAKAO,
149-
kakaoUserInfo.getSocialId()
150-
)
146+
User user = userRepository.findByEmail(kakaoUserInfo.getEmail())
151147
.orElseGet(() -> registerKakaoUser(kakaoUserInfo));
152148

153149
// 4. 탈퇴 사용자 체크
@@ -188,11 +184,7 @@ public LoginResponse googleLogin(String code) {
188184
}
189185

190186
// 3. 소셜 ID 기준 사용자 조회
191-
User user = userRepository
192-
.findBySocialTypeAndSocialId(
193-
SocialType.GOOGLE,
194-
googleUserInfo.getSocialId()
195-
)
187+
User user = userRepository.findByEmail(googleUserInfo.getEmail())
196188
.orElseGet(() -> registerGoogleUser(googleUserInfo));
197189

198190
// 4. 탈퇴 사용자 체크

0 commit comments

Comments
 (0)