-
Notifications
You must be signed in to change notification settings - Fork 0
/
login_callback.html
34 lines (34 loc) · 1.23 KB
/
login_callback.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="ko">
<head>
<script
type="text/javascript"
src="https://static.nid.naver.com/js/naverLogin_implicit-1.0.3.js"
charset="utf-8"
></script>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
</head>
<body>
<h1>Thanks</h1>
<script type="text/javascript">
var naver_id_login = new naver_id_login(
"ltuhWOjdAfK3qSseLYN5",
"http://beefiker.cafe24.com/funware/login_callback.html"
);
// 접근 토큰 값 출력
// console.log("토큰 : " + naver_id_login.oauthParams.access_token);
// 네이버 사용자 프로필 조회
naver_id_login.get_naver_userprofile("naverSignInCallback()");
// 네이버 사용자 프로필 조회 이후 프로필 정보를 처리할 callback function
function naverSignInCallback(res) {
const email = naver_id_login.getProfileData("email");
const nickname = naver_id_login.getProfileData("nickname");
const name = naver_id_login.getProfileData("name");
console.log(email);
console.log(nickname);
console.log(name);
// location.href = "login.php?email=" + email;
}
</script>
</body>
</html>