
250625 하석형 소셜로그인 성공 시 소셜 타입을 변환하여 이후 함수에서 변환 작업 제거
@05cb655735644710354b94c3042f8c2f1553bf4d
--- src/main/java/com/takensoft/cms/mber/service/Impl/UnifiedLoginServiceImpl.java
+++ src/main/java/com/takensoft/cms/mber/service/Impl/UnifiedLoginServiceImpl.java
... | ... | @@ -376,7 +376,7 @@ |
376 | 376 |
// 2-1. 기존 계정 있음 - 해당 소셜이 이미 연동되어 있는지 확인 |
377 | 377 |
HashMap<String, Object> params = new HashMap<>(); |
378 | 378 |
params.put("mbrId", existingUser.getMbrId()); |
379 |
-// params.put("lgnOffrType", convertProviderToMbrType(lgnOffrType)); // 25.06.23 - 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
379 |
+// params.put("lgnOffrType", convertProviderToMbrType(lgnOffrType)); // 25.06.23 - OAuth2AuthenticationSuccessHandler에서 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
380 | 380 |
params.put("lgnOffrType", lgnOffrType); |
381 | 381 |
|
382 | 382 |
MberSocialAccountVO existingSocial = mberDAO.findSocialAccountByProvider(params); |
... | ... | @@ -409,7 +409,8 @@ |
409 | 409 |
try { |
410 | 410 |
// 회원 ID 생성 |
411 | 411 |
String mbrId = mberIdgn.getNextStringId(); |
412 |
- String lowProviderType = convertProviderToMbrType(lgnOffrType); |
|
412 |
+// String lowProviderType = convertProviderToMbrType(lgnOffrType); // 25.06.23 - OAuth2AuthenticationSuccessHandler에서 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
413 |
+ String lowProviderType = lgnOffrType; |
|
413 | 414 |
String ip = httpRequestUtil.getIp(request); |
414 | 415 |
|
415 | 416 |
// 새 사용자 정보 설정 |
... | ... | @@ -473,7 +474,7 @@ |
473 | 474 |
// 중복 연동 확인 |
474 | 475 |
HashMap<String, Object> params = new HashMap<>(); |
475 | 476 |
params.put("mbrId", mbrId); |
476 |
-// params.put("lgnOffrType", convertProviderToMbrType(lgnOffrType)); // 25.06.23 - 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
477 |
+// params.put("lgnOffrType", convertProviderToMbrType(lgnOffrType)); // 25.06.23 - OAuth2AuthenticationSuccessHandler에서 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
477 | 478 |
params.put("lgnOffrType", lgnOffrType); |
478 | 479 |
|
479 | 480 |
MberSocialAccountVO existing = mberDAO.findSocialAccountByProvider(params); |
... | ... | @@ -483,7 +484,7 @@ |
483 | 484 |
|
484 | 485 |
MberSocialAccountVO socialAccount = new MberSocialAccountVO(); |
485 | 486 |
socialAccount.setMbrId(mbrId); |
486 |
-// socialAccount.setLgnOffrType(convertProviderToMbrType(lgnOffrType)); // 25.06.23 - 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
487 |
+// socialAccount.setLgnOffrType(convertProviderToMbrType(lgnOffrType)); // 25.06.23 - OAuth2AuthenticationSuccessHandler에서 소셜 영문명(google)이 아닌 코드(G)로 들어와서 변환 시도 시 default인 'S'로 변경됨 |
|
487 | 488 |
socialAccount.setLgnOffrType(lgnOffrType); |
488 | 489 |
socialAccount.setSnsLgnId(snsLgnId); |
489 | 490 |
socialAccount.setLgnId(lgnId); |
... | ... | @@ -524,14 +525,14 @@ |
524 | 525 |
|
525 | 526 |
// 해지된 계정이 메인 프로필이었다면 다른 계정을 메인으로 설정 |
526 | 527 |
MberSocialAccountVO unlinkedAccount = linkedAccounts.stream() |
527 |
- .filter(acc -> acc.getLgnOffrType().equals(convertProviderToMbrType(lgnOffrType))) |
|
528 |
+ .filter(acc -> acc.getLgnOffrType().equals(lgnOffrType)) |
|
528 | 529 |
.findFirst() |
529 | 530 |
.orElse(null); |
530 | 531 |
|
531 | 532 |
if (unlinkedAccount != null && unlinkedAccount.getMainPrflYn()) { |
532 | 533 |
// 첫 번째 활성 계정을 메인으로 설정 |
533 | 534 |
MberSocialAccountVO newPrimary = linkedAccounts.stream() |
534 |
- .filter(acc -> !acc.getLgnOffrType().equals(convertProviderToMbrType(lgnOffrType))) |
|
535 |
+ .filter(acc -> !acc.getLgnOffrType().equals(lgnOffrType)) |
|
535 | 536 |
.findFirst() |
536 | 537 |
.orElse(null); |
537 | 538 |
|
... | ... | @@ -594,7 +595,7 @@ |
594 | 595 |
try { |
595 | 596 |
HashMap<String, Object> params = new HashMap<>(); |
596 | 597 |
params.put("mbrId", mbrId); |
597 |
- params.put("lgnOffrType", convertProviderToMbrType(lgnOffrType)); |
|
598 |
+ params.put("lgnOffrType", lgnOffrType); |
|
598 | 599 |
params.put("mdfr", "PROFILE_UPDATE"); |
599 | 600 |
|
600 | 601 |
mberDAO.setPrimaryProfile(params); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?