-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathyahoo.html
44 lines (44 loc) · 2.09 KB
/
yahoo.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
35
36
37
38
39
40
41
42
43
44
<html>
<head>
<script type="text/javascript">
window.yconnectInit = function() {
YAHOO.JP.yconnect.Authorization.init({
button: { // ボタンに関しては下記URLを参考に設定してください
// https://developer.yahoo.co.jp/yconnect/loginbuttons.html
format: "image",
type: "a",
textType:"a",
width: 196,
height: 38,
className: "yconnectLogin"
},
authorization: {
clientId: "dj00aiZpPVpLOUVrSzVZaW01MCZzPWNvbnN1bWVyc2VjcmV0Jng9YTI-", // 登録したClient IDを入力してください
redirectUri: "https://shuheiokuda0704.github.io/", // 本スクリプトを埋め込むページのURLを入力してください
scope: "openid email profile address",
// Authorization Codeフローの場合はresponseType, state, nonceパラメーターは必須です,
responseType: "code",
state: "<サーバーサイドで生成したCSRF対策用のランダム文字列>",
nonce: "<サーバーサイドで生成したリプレイアタック対策用のランダム文字列>",
windowWidth: "500",
windowHeight: "400"
},
onError: function(res) {
// エラー発生時のコールバック関数
},
onCancel: function(res) {
// 同意キャンセルされた時のコールバック関数
}
});
};
(function(){
var fs = document.getElementsByTagName("script")[0], s = document.createElement("script");
s.setAttribute("src", "https://s.yimg.jp/images/login/yconnect/auth/2.0.3/auth-min.js");
fs.parentNode.insertBefore(s, fs);
})();
</script>
</head>
<body>
<span class="yconnectLogin"></span>
</body>
</html>