diff --git a/FO/Controllers/AccountController.cs b/FO/Controllers/AccountController.cs
index cf6c05d..dfa66f7 100644
--- a/FO/Controllers/AccountController.cs
+++ b/FO/Controllers/AccountController.cs
@@ -844,6 +844,10 @@ namespace NP.FO.Controllers
{
return View();
}
+ public ActionResult NaverCallbackJoin()
+ {
+ return View();
+ }
public ActionResult KakaoCallback()
{
return View();
diff --git a/FO/FO.csproj b/FO/FO.csproj
index 6c456b5..73c9fb3 100644
--- a/FO/FO.csproj
+++ b/FO/FO.csproj
@@ -670,6 +670,7 @@
+
diff --git a/FO/Views/Account/IndexBase.cshtml b/FO/Views/Account/IndexBase.cshtml
index 22dbe5e..9daa10e 100644
--- a/FO/Views/Account/IndexBase.cshtml
+++ b/FO/Views/Account/IndexBase.cshtml
@@ -107,14 +107,20 @@
{
clientId: "@naverClientId",
callbackUrl: "https://www.ynicte.com/Account/NaverCallback",
- isPopup: false,
- loginButton: { color: "green", type: 3, height: 60 },
+ isPopup: true,
+ loginButton: { color: "green", type: 3, height: 60 }
}
);
function loginWithKakao() {
- Kakao.Auth.authorize({
- redirectUri: 'https://www.ynicte.com/Account/KakaoCallback'
+ Kakao.Auth.login({
+ success: function (authObj) {
+ location.href = "https://www.ynicte.com/Account/KakaoCallback"
+ },
+ fail: function (err) {
+ alert("카카오 아이디로 로그인에 실패했습니다.");
+ console.log(JSON.stringify(err))
+ },
})
}
diff --git a/FO/Views/Account/Join.cshtml b/FO/Views/Account/Join.cshtml
index 575909e..1fd657e 100644
--- a/FO/Views/Account/Join.cshtml
+++ b/FO/Views/Account/Join.cshtml
@@ -263,7 +263,6 @@ else
if (@Request["jointype"] == "3") {
$.when(
Kakao.init("@kakaoAppkey"),
- kakaoDisplayToken()
).done(function () {
Kakao.API.request({
url: '/v2/user/me',
@@ -285,24 +284,5 @@ else
}
});
-
- function kakaoDisplayToken() {
- const token = getKakaoCookie('authorize-access-token')
- if (token) {
- Kakao.Auth.setAccessToken(token)
- Kakao.Auth.getStatusInfo(({ status }) => {
- if (status === 'connected') {
- document.getElementById('token-result').innerText = 'login success. token: ' + Kakao.Auth.getAccessToken()
- } else {
- Kakao.Auth.setAccessToken(null)
- }
- })
- }
- }
- function getKakaoCookie(name) {
- const value = "; " + document.cookie;
- const parts = value.split("; " + name + "=");
- if (parts.length === 2) return parts.pop().split(";").shift();
- }
}
\ No newline at end of file
diff --git a/FO/Views/Account/JoinTSel.cshtml b/FO/Views/Account/JoinTSel.cshtml
index 2a49e53..a27b10c 100644
--- a/FO/Views/Account/JoinTSel.cshtml
+++ b/FO/Views/Account/JoinTSel.cshtml
@@ -32,15 +32,21 @@
var naverLogin = new naver.LoginWithNaverId(
{
clientId: "@naverClientId",
- callbackUrl: "https://www.ynicte.com/Account/Join?jointype=2",
- isPopup: false,
- loginButton: { color: "green", type: 3, height: 60 }
+ callbackUrl: "https://www.ynicte.com/Account/NaverCallbackJoin",
+ isPopup: true,
+ loginButton: { color: "green", type: 3, height: 60 }
}
);
function loginWithKakao() {
- Kakao.Auth.authorize({
- redirectUri: 'https://www.ynicte.com/Account/Join?jointype=3'
+ Kakao.Auth.login({
+ success: function (authObj) {
+ location.href = "https://www.ynicte.com/Account/Join?jointype=3"
+ },
+ fail: function (err) {
+ alert("카카오 아이디로 회원가입에 실패했습니다.");
+ console.log(JSON.stringify(err))
+ },
})
}
diff --git a/FO/Views/Account/KakaoCallback.cshtml b/FO/Views/Account/KakaoCallback.cshtml
index 8aa001a..a3dc85e 100644
--- a/FO/Views/Account/KakaoCallback.cshtml
+++ b/FO/Views/Account/KakaoCallback.cshtml
@@ -7,30 +7,10 @@
\ No newline at end of file