sns 로그인 로직 삭제
This commit is contained in:
parent
670613eedb
commit
2dbccbee35
|
|
@ -10,13 +10,6 @@
|
||||||
var kakaoClientId = ViewBag.kakaoClientID;
|
var kakaoClientId = ViewBag.kakaoClientID;
|
||||||
var googleClientId = ViewBag.googleClientID;
|
var googleClientId = ViewBag.googleClientID;
|
||||||
}
|
}
|
||||||
<head>
|
|
||||||
<script type="text/javascript" src="/js/naveridlogin_js_sdk_2.0.0.js"></script>
|
|
||||||
<script type="text/javascript" src="/js/kakao.js"></script>
|
|
||||||
<script src="https://apis.google.com/js/platform.js" async defer></script>
|
|
||||||
<meta name="google-signin-client_id" content="@googleClientId">
|
|
||||||
</head>
|
|
||||||
<div class="g-signin2" data-onsuccess="onGoogleLogIn" style="display:none"></div> @*구글로그인관련*@
|
|
||||||
@if (ViewBag.JoinOK)
|
@if (ViewBag.JoinOK)
|
||||||
{
|
{
|
||||||
<ul class="jnStep">
|
<ul class="jnStep">
|
||||||
|
|
@ -156,7 +149,6 @@ else
|
||||||
if ('@(ViewBag.JoinOK?1:0)' == '1') {
|
if ('@(ViewBag.JoinOK?1:0)' == '1') {
|
||||||
$("#pageTitle h3").text("회원가입 완료");
|
$("#pageTitle h3").text("회원가입 완료");
|
||||||
}
|
}
|
||||||
//snsLogin();
|
|
||||||
|
|
||||||
$("input:radio[name='isCompany']").on("click", function () {
|
$("input:radio[name='isCompany']").on("click", function () {
|
||||||
var isCompany = $(this).val();
|
var isCompany = $(this).val();
|
||||||
|
|
@ -259,87 +251,4 @@ else
|
||||||
mobilechkview('MCHK');
|
mobilechkview('MCHK');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onGoogleLogIn(googleUser) {
|
|
||||||
if ("@(Request["jointype"])" == "1") {
|
|
||||||
var profile = googleUser.getBasicProfile();
|
|
||||||
$("#username").val(profile.getName());
|
|
||||||
$("#email").val(profile.getEmail());
|
|
||||||
$("#snsid").val(profile.getId());
|
|
||||||
$("#jointype").val(1); //0:일반회원가입,1:google,2:naver,3:kakao
|
|
||||||
$("#username").prop("readonly", "readonly");
|
|
||||||
$("#username").css("background-color", "#ddd");
|
|
||||||
$("#email").prop("readonly", "readonly");
|
|
||||||
$("#email").css("background-color", "#ddd");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@*function snsLogin() {
|
|
||||||
if ("@(Request["jointype"])" == "2") {
|
|
||||||
var naverLogin = new naver.LoginWithNaverId(
|
|
||||||
{
|
|
||||||
clientId: "@naverClientId",
|
|
||||||
callbackUrl: "https://www.cte.or.kr/Account/Join?jointype=2",
|
|
||||||
isPopup: false,
|
|
||||||
callbackHandle: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
naverLogin.init();
|
|
||||||
naverLogin.getLoginStatus(function (status) {
|
|
||||||
if (status) {
|
|
||||||
var email = naverLogin.user.getEmail();
|
|
||||||
var name = naverLogin.user.getName();
|
|
||||||
var uniqId = naverLogin.user.getId();
|
|
||||||
var profileImage = naverLogin.user.getProfileImage();
|
|
||||||
var birthday = naverLogin.user.getBirthday();
|
|
||||||
var age = naverLogin.user.getAge();
|
|
||||||
if (email == undefined || email == null) {
|
|
||||||
alert("이메일은 필수정보입니다. 정보제공을 동의해주세요.");
|
|
||||||
naverLogin.reprompt();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (name == undefined || name == null) {
|
|
||||||
alert("이름은 필수정보입니다. 정보제공을 동의해주세요.");
|
|
||||||
naverLogin.reprompt();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
$("#username").val(name);
|
|
||||||
$("#email").val(email);
|
|
||||||
$("#snsid").val(uniqId);
|
|
||||||
$("#jointype").val(2); //0:일반회원가입,1:google,2:naver,3:kakao
|
|
||||||
$("#username").prop("readonly", "readonly");
|
|
||||||
$("#username").css("background-color", "#ddd");
|
|
||||||
$("#email").prop("readonly", "readonly");
|
|
||||||
$("#email").css("background-color", "#ddd");
|
|
||||||
} else {
|
|
||||||
alert("네이버 AccessToken이 올바르지 않습니다. 관리자에게 문의하세요. error status[" + status + "]");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
if ("@(Request["jointype"])" == "3") {
|
|
||||||
$.when(
|
|
||||||
Kakao.init("@kakaoClientId"),
|
|
||||||
).done(function () {
|
|
||||||
Kakao.API.request({
|
|
||||||
url: '/v2/user/me',
|
|
||||||
success: function (res) {
|
|
||||||
$("#username").val(res.properties.nickname);
|
|
||||||
if (res.kakao_account.email != null && res.kakao_account.email != "" && res.kakao_account.email != undefined) {
|
|
||||||
$("#email").val(res.kakao_account.email);
|
|
||||||
$("#email").prop("readonly", "readonly");
|
|
||||||
$("#email").css("background-color", "#ddd");
|
|
||||||
}
|
|
||||||
$("#snsid").val(res.id);
|
|
||||||
$("#jointype").val(3); //0:일반회원가입,1:google,2:naver,3:kakao
|
|
||||||
$("#username").prop("readonly", "readonly");
|
|
||||||
$("#username").css("background-color", "#ddd");
|
|
||||||
},
|
|
||||||
fail: function (error) {
|
|
||||||
console.log(error);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}*@
|
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue