diff --git a/FO/Views/Account/IndexBase.cshtml b/FO/Views/Account/IndexBase.cshtml index eccf63e..ea083e4 100644 --- a/FO/Views/Account/IndexBase.cshtml +++ b/FO/Views/Account/IndexBase.cshtml @@ -83,21 +83,7 @@ } snsInit(); }); - var gauth; - function googleInit() { - gapi.load('auth2', function () { - var gauth = gapi.auth2.init({ - client_id: "@googleClientId", - scope: 'profile' - }); - gauth.then(function () { - console.log('google init success'); - - }, function () { - console.error('google init fail'); - }) - }); - } + function login() { if (val("uid") != "" && val("upw") != "") { capp("/focommon/login", { uid: val("uid"), upw: val("upw"), issaveid: $("#issaveid").prop("checked") }, "cblogin"); @@ -122,6 +108,23 @@ } } else { msg("입력하신 아이디/비밀번호와 일치하는 계정이 없습니다. 다시 확인해주세요."); } } + + var gauth; + function googleInit() { + gapi.load('auth2', function () { + var gauth = gapi.auth2.init({ + client_id: "@googleClientId", + scope: 'profile' + }); + gauth.then(function () { + console.log('google init success'); + + }, function () { + console.error('google init fail'); + }) + }); + } + var naverLogin = new naver.LoginWithNaverId( { clientId: "@naverClientId", diff --git a/FO/Views/Account/Join.cshtml b/FO/Views/Account/Join.cshtml index d06a249..c0b705f 100644 --- a/FO/Views/Account/Join.cshtml +++ b/FO/Views/Account/Join.cshtml @@ -273,9 +273,7 @@ else $("#email").prop("readonly", "readonly"); $("#email").css("background-color", "#ddd"); } else { - alert("callback 처리에 실패하였습니다. 관리자에게 문의하세요. error status[" + status + "]"); - history.back(-1); - return; + alert("네이버 AccessToken이 올바르지 않습니다. 관리자에게 문의하세요. error status[" + status + "]"); } }); } diff --git a/FO/Views/Account/NaverCallback.cshtml b/FO/Views/Account/NaverCallback.cshtml index 7f5c50c..b38c11a 100644 --- a/FO/Views/Account/NaverCallback.cshtml +++ b/FO/Views/Account/NaverCallback.cshtml @@ -50,7 +50,7 @@ //0:일반회원가입,1:google,2:naver,3:kakao capp("/focommon/CheckExistSnsId", { snsid: uniqId, jointype: 2 }, "snslogin"); } else { - console.log("callback 처리에 실패하였습니다."); + alert("네이버 AccessToken이 올바르지 않습니다. 관리자에게 문의하세요. error status[" + status + "]"); } }); }); diff --git a/FO/Views/Account/NaverCallbackJoin.cshtml b/FO/Views/Account/NaverCallbackJoin.cshtml index e665f08..db7fe23 100644 --- a/FO/Views/Account/NaverCallbackJoin.cshtml +++ b/FO/Views/Account/NaverCallbackJoin.cshtml @@ -1,12 +1,33 @@ @{ Layout = null; - @Html.Partial("./Partial/JS") + var naverClientId = ViewBag.naverClientID; } +
+ @Html.Partial("./Partial/JS") + + \ No newline at end of file