質問編集履歴
13
タイトルの変更
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
GASから
|
1
|
+
GASからLINEログインへのリンクで「in a frame because it set 'X-Frame-Options' to 'deny'」となる
|
test
CHANGED
File without changes
|
12
コンソールのエラーログを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,11 +4,15 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
|
7
|
-
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、下記の「2」で接続が
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
7
|
+
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、下記の「2」で接続でコンソール上下記のエラーが出てしまいます。
|
8
|
+
|
9
|
+
```Console
|
10
|
+
|
11
|
+
Refused to display 'https://access.line.me/oauth2/v2.1/login?loginState=2AKbUE4eZMcvLPQOJJzjxr&loginChannelId=xxxxxxxxxx&returnUri=%2Foauth2%2Fv2.1%2Fauthorize%2Fconsent%3Fscope%3Dprofile%26response_type%3Dcode%26redirect_uri%3Dhttps%253A%252F%252Fscript.google.com%252Fmacros%252Fd%252FGASのスクリプトID%252Fusercallback%26state%3Dxxxxxx%26client_id%3Dxxxxxxxxxx' in a frame because it set 'X-Frame-Options' to 'deny'.
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
|
12
16
|
|
13
17
|
何が間違えているのでしょうか?質問させてください。
|
14
18
|
|
11
試したことを修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,7 +44,7 @@
|
|
44
44
|
|
45
45
|
test.gs
|
46
46
|
|
47
|
-
```
|
47
|
+
```gs
|
48
48
|
|
49
49
|
function doGet(e) {
|
50
50
|
|
@@ -72,7 +72,7 @@
|
|
72
72
|
|
73
73
|
index.html
|
74
74
|
|
75
|
-
```
|
75
|
+
```HTML
|
76
76
|
|
77
77
|
<!DOCTYPE html>
|
78
78
|
|
@@ -102,7 +102,7 @@
|
|
102
102
|
|
103
103
|
main.html
|
104
104
|
|
105
|
-
```
|
105
|
+
```HTML
|
106
106
|
|
107
107
|
<!DOCTYPE html>
|
108
108
|
|
@@ -146,16 +146,20 @@
|
|
146
146
|
|
147
147
|
・「ERR_BLOCKED_BY_RESPONSE」でググるも情報が少なく、いくつかのサイトでiframeの問題の可能性があると見つけたため、test.gsのreturn文を下記の通り変更してみるも変わりなしです。
|
148
148
|
|
149
|
+
・Index.htmlに指定しているredirect_uriのURLをエンコードした内容に書き直しても同じエラーとなります。
|
150
|
+
|
149
|
-
|
151
|
+
test.gs
|
152
|
+
|
153
|
+
```gs
|
150
154
|
|
151
155
|
return HtmlService.createTemplateFromFile('index').evaluate().setTitle('INDEX').setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
|
152
156
|
|
153
157
|
```
|
154
158
|
|
155
|
-
・Index.htmlに指定しているredirect_uriのURLをエンコードした内容に書き直しても同じエラーとなります。
|
156
|
-
|
157
159
|
・「1」の時点で表示されているソースを見ると下記の内容でした。
|
158
160
|
|
161
|
+
(goog.script.init内のuserHtmlのみが当方で作成したソースで、それ以外はGASが生成して返されたソースです。)
|
162
|
+
|
159
163
|
```HTML
|
160
164
|
|
161
165
|
<!doctype html>
|
10
試したことを追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -30,7 +30,7 @@
|
|
30
30
|
|
31
31
|
ウェブページへのアクセス不可
|
32
32
|
|
33
|
-
ウェブページ(https://access.line.me/oauth2/v2.1/login?loginState=LVH2Q9uvdA38qpXYZzIegV&loginChannelId=xxxxxxxxxx&returnUri=%2Foauth2%2Fv2.1%2Fauthorize%2Fconsent%3Fscope%3Dprofile%26response_type%3Dcode%26redirect_uri%3Dhttps%253A%252F%252Fscript.google.com%252Fmacros%252Fd%252F
|
33
|
+
ウェブページ(https://access.line.me/oauth2/v2.1/login?loginState=LVH2Q9uvdA38qpXYZzIegV&loginChannelId=xxxxxxxxxx&returnUri=%2Foauth2%2Fv2.1%2Fauthorize%2Fconsent%3Fscope%3Dprofile%26response_type%3Dcode%26redirect_uri%3Dhttps%253A%252F%252Fscript.google.com%252Fmacros%252Fd%252FGASのスクリプトID%252Fusercallback%26state%3Dxxxxxx%26client_id%3Dxxxxxxxxxx)は次の理由で読み込めませんでした:
|
34
34
|
|
35
35
|
|
36
36
|
|
@@ -82,7 +82,7 @@
|
|
82
82
|
|
83
83
|
<meta charset="uft-8">
|
84
84
|
|
85
|
-
<meta http-equiv="refresh" content="1;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile&redirect_uri=https%3A%2F%2Fscript.google.com%2Fmacros%2Fd%2F
|
85
|
+
<meta http-equiv="refresh" content="1;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile&redirect_uri=https%3A%2F%2Fscript.google.com%2Fmacros%2Fd%2FGASのスクリプトID%2Fusercallback">
|
86
86
|
|
87
87
|
</head>
|
88
88
|
|
@@ -154,6 +154,194 @@
|
|
154
154
|
|
155
155
|
・Index.htmlに指定しているredirect_uriのURLをエンコードした内容に書き直しても同じエラーとなります。
|
156
156
|
|
157
|
+
・「1」の時点で表示されているソースを見ると下記の内容でした。
|
158
|
+
|
159
|
+
```HTML
|
160
|
+
|
161
|
+
<!doctype html>
|
162
|
+
|
163
|
+
<html>
|
164
|
+
|
165
|
+
<head>
|
166
|
+
|
167
|
+
<meta name="chromevox" content-script="no">
|
168
|
+
|
169
|
+
<title>HELLO</title>
|
170
|
+
|
171
|
+
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
|
172
|
+
|
173
|
+
<link rel="stylesheet" href="/static/macros/client/css/927719976-mae_html_css_ltr.css">
|
174
|
+
|
175
|
+
<script type="text/javascript" src="/static/macros/client/js/1162875732-warden_bin_i18n_warden__ja.js" nonce="/gTGIhVzEt2ZNu2pc1PJjg"></script>
|
176
|
+
|
177
|
+
</head>
|
178
|
+
|
179
|
+
<body role="main">
|
180
|
+
|
181
|
+
<table id="warning-bar-table" class="full_size" cellspacing="0" cellpadding="0">
|
182
|
+
|
183
|
+
<tr>
|
184
|
+
|
185
|
+
<td>
|
186
|
+
|
187
|
+
<div id="warning" class="warning-bar"></div>
|
188
|
+
|
189
|
+
</td>
|
190
|
+
|
191
|
+
</tr>
|
192
|
+
|
193
|
+
<tr>
|
194
|
+
|
195
|
+
<td style="height: 100%">
|
196
|
+
|
197
|
+
<iframe
|
198
|
+
|
199
|
+
id="sandboxFrame"
|
200
|
+
|
201
|
+
title="HELLO"
|
202
|
+
|
203
|
+
allow="accelerometer *;
|
204
|
+
|
205
|
+
ambient-light-sensor *;
|
206
|
+
|
207
|
+
autoplay *;
|
208
|
+
|
209
|
+
camera *;
|
210
|
+
|
211
|
+
encrypted-media *;
|
212
|
+
|
213
|
+
fullscreen *;
|
214
|
+
|
215
|
+
geolocation *;
|
216
|
+
|
217
|
+
gyroscope *;
|
218
|
+
|
219
|
+
magnetometer *;
|
220
|
+
|
221
|
+
microphone *;
|
222
|
+
|
223
|
+
midi *;
|
224
|
+
|
225
|
+
payment *;
|
226
|
+
|
227
|
+
picture-in-picture *;
|
228
|
+
|
229
|
+
speaker *;
|
230
|
+
|
231
|
+
usb *;
|
232
|
+
|
233
|
+
vibrate *;
|
234
|
+
|
235
|
+
vr *"
|
236
|
+
|
237
|
+
sandbox="allow-downloads
|
238
|
+
|
239
|
+
allow-forms
|
240
|
+
|
241
|
+
allow-modals
|
242
|
+
|
243
|
+
allow-popups
|
244
|
+
|
245
|
+
allow-popups-to-escape-sandbox
|
246
|
+
|
247
|
+
allow-same-origin
|
248
|
+
|
249
|
+
allow-scripts
|
250
|
+
|
251
|
+
allow-top-navigation"></iframe>
|
252
|
+
|
253
|
+
</td>
|
254
|
+
|
255
|
+
</tr>
|
256
|
+
|
257
|
+
</table>
|
258
|
+
|
259
|
+
<script type="text/javascript" nonce="/gTGIhVzEt2ZNu2pc1PJjg">
|
260
|
+
|
261
|
+
(
|
262
|
+
|
263
|
+
function() {
|
264
|
+
|
265
|
+
var el = document.getElementById('sandboxFrame');
|
266
|
+
|
267
|
+
el.onload = function() {
|
268
|
+
|
269
|
+
goog.script.init(
|
270
|
+
|
271
|
+
"{
|
272
|
+
|
273
|
+
"functionNames":["doGet"]
|
274
|
+
|
275
|
+
,"sandboxMode":"IFRAME_SANDBOX"
|
276
|
+
|
277
|
+
,"callbackTimeout":390000
|
278
|
+
|
279
|
+
,"deploymentId":"デプロイメントID"
|
280
|
+
|
281
|
+
,"eei":""
|
282
|
+
|
283
|
+
,"sandboxHost":"https://n-iavjpkhnbj3j3nvcg3fpz73nnempjkndwekqr2y-0lu-script.googleusercontent.com"
|
284
|
+
|
285
|
+
,"clientSideProperties":{"google.script.sandbox.mode":"IFRAME_SANDBOX"
|
286
|
+
|
287
|
+
,"google.script.host.origin":"https://script.google.com"}
|
288
|
+
|
289
|
+
,"actionPrefix":"/macros/s/デプロイメントID"
|
290
|
+
|
291
|
+
,"userHtml":"<!DOCTYPE html>
|
292
|
+
|
293
|
+
<html lang="ja">
|
294
|
+
|
295
|
+
<head>
|
296
|
+
|
297
|
+
<meta charset="uft-8">
|
298
|
+
|
299
|
+
<meta http-equiv="refresh" content="20;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile&redirect_uri=https://script.google.com/macros/d/GASのスクリプトID/usercallback">
|
300
|
+
|
301
|
+
</head>
|
302
|
+
|
303
|
+
<body>
|
304
|
+
|
305
|
+
<p>test</p>
|
306
|
+
|
307
|
+
</body>
|
308
|
+
|
309
|
+
</html>"
|
310
|
+
|
311
|
+
,"ncc":"{"awhs":true}"
|
312
|
+
|
313
|
+
}"
|
314
|
+
|
315
|
+
, "AJuLMu2sNdwkuf81Mzux7sD4Is3E47NnGw:xxxxxxxxxxxxx"
|
316
|
+
|
317
|
+
, undefined
|
318
|
+
|
319
|
+
, true
|
320
|
+
|
321
|
+
, true
|
322
|
+
|
323
|
+
, "true"
|
324
|
+
|
325
|
+
, "https://n-iavjpkhnbj3j3nvcg3fpz73nnempjkndwekqr2y-0lu-script.googleusercontent.com");
|
326
|
+
|
327
|
+
}
|
328
|
+
|
329
|
+
el.src = 'https://n-iavjpkhnbj3j3nvcg3fpz73nnempjkndwekqr2y-0lu-script.googleusercontent.com/userCodeAppPanel';
|
330
|
+
|
331
|
+
}()
|
332
|
+
|
333
|
+
);
|
334
|
+
|
335
|
+
</script>
|
336
|
+
|
337
|
+
</body>
|
338
|
+
|
339
|
+
</html>
|
340
|
+
|
341
|
+
```
|
342
|
+
|
343
|
+
|
344
|
+
|
157
345
|
|
158
346
|
|
159
347
|
### 補足情報
|
9
test
CHANGED
File without changes
|
test
CHANGED
@@ -128,7 +128,7 @@
|
|
128
128
|
|
129
129
|
```
|
130
130
|
|
131
|
-
LINE
|
131
|
+
LINEログインのチャネルに設定しているCallback URL
|
132
132
|
|
133
133
|
```
|
134
134
|
|
8
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
GASからのLINEログインでERR_BLOCKED_BY_RESPONSE
|
1
|
+
GASからのLINEログインでERR_BLOCKED_BY_RESPONSEとなる
|
test
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
|
3
3
|
GASで作成したWEBページからLINEログインを行い、ページにアクセスするLINEユーザーの情報(ユーザー名等)を取得したいと考えています。
|
4
4
|
|
5
|
+
|
6
|
+
|
5
7
|
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、下記の「2」で接続が拒否されているようです。
|
8
|
+
|
9
|
+
|
6
10
|
|
7
11
|
エラーメッセージから何が誤っているのか判断ができません。
|
8
12
|
|
@@ -21,12 +25,6 @@
|
|
21
25
|
|
22
26
|
|
23
27
|
### 発生している問題・エラーメッセージ
|
24
|
-
|
25
|
-
~~ウェブページへのアクセス不可~~
|
26
|
-
|
27
|
-
~~ウェブページ(https://access.line.me/dialog/oauth/weblogin?response_type=code&client_id=xxxxxxxxxx&redirect_uri=https://script.google.com/macros/d/xxxxxxxxxx/usercallback&state=xxxxxx)は次の理由で読み込めませんでした:~~
|
28
|
-
|
29
|
-
~~net::ERR_BLOCKED_BY_RESPONSE~~
|
30
28
|
|
31
29
|
```
|
32
30
|
|
@@ -73,12 +71,6 @@
|
|
73
71
|
|
74
72
|
|
75
73
|
index.html
|
76
|
-
|
77
|
-
修正箇所
|
78
|
-
|
79
|
-
~~<meta http-equiv="refresh" content="5;URL=https://access.line.me/oauth2/v2.1/authoriz?response_type=code&client_id=xxxxxxxxxx&redirect_uri=https://script.google.com/macros/d/xxxxxxxxxx/usercallback&state=xxxxxx">~~
|
80
|
-
|
81
|
-
~~<meta http-equiv="refresh" content="2;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile%20openid&redirect_uri=https://script.google.com/macros/d/GASのスクリプトID/usercallback">~~
|
82
74
|
|
83
75
|
```
|
84
76
|
|
@@ -148,8 +140,6 @@
|
|
148
140
|
|
149
141
|
・LINEログインのチャネルが開発中となっていたので、公開中に変更するも変わりなしです。
|
150
142
|
|
151
|
-
~~・2のLINEログインページのURLを直接指定してもエラーとなります。~~
|
152
|
-
|
153
143
|
・ブラウザをchromeで試してもエラーとなります。
|
154
144
|
|
155
145
|
・PCのLINEブラウザ、chromeで試してもエラーとなります。
|
@@ -178,6 +168,6 @@
|
|
178
168
|
|
179
169
|
参考ドキュメント
|
180
170
|
|
181
|
-
|
171
|
+
https://developers.line.biz/ja/docs/line-login/integrate-line-login-v2/
|
182
172
|
|
183
173
|
https://developers.line.biz/ja/docs/line-login/integrate-line-login/
|
7
試したことを追記(それに伴い、ソースコードの内容も少し修正)
test
CHANGED
File without changes
|
test
CHANGED
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
ウェブページへのアクセス不可
|
34
34
|
|
35
|
-
ウェブページ(https://access.line.me/oauth2/v2.1/login?loginState=q
|
35
|
+
ウェブページ(https://access.line.me/oauth2/v2.1/login?loginState=LVH2Q9uvdA38qpXYZzIegV&loginChannelId=xxxxxxxxxx&returnUri=%2Foauth2%2Fv2.1%2Fauthorize%2Fconsent%3Fscope%3Dprofile%26response_type%3Dcode%26redirect_uri%3Dhttps%253A%252F%252Fscript.google.com%252Fmacros%252Fd%252F{GASのスクリプトID}%252Fusercallback%26state%3Dxxxxxx%26client_id%3Dxxxxxxxxxx)は次の理由で読み込めませんでした:
|
36
36
|
|
37
37
|
|
38
38
|
|
@@ -78,6 +78,8 @@
|
|
78
78
|
|
79
79
|
~~<meta http-equiv="refresh" content="5;URL=https://access.line.me/oauth2/v2.1/authoriz?response_type=code&client_id=xxxxxxxxxx&redirect_uri=https://script.google.com/macros/d/xxxxxxxxxx/usercallback&state=xxxxxx">~~
|
80
80
|
|
81
|
+
~~<meta http-equiv="refresh" content="2;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile%20openid&redirect_uri=https://script.google.com/macros/d/GASのスクリプトID/usercallback">~~
|
82
|
+
|
81
83
|
```
|
82
84
|
|
83
85
|
<!DOCTYPE html>
|
@@ -88,7 +90,7 @@
|
|
88
90
|
|
89
91
|
<meta charset="uft-8">
|
90
92
|
|
91
|
-
<meta http-equiv="refresh" content="
|
93
|
+
<meta http-equiv="refresh" content="1;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile&redirect_uri=https%3A%2F%2Fscript.google.com%2Fmacros%2Fd%2F{GASのスクリプトID}%2Fusercallback">
|
92
94
|
|
93
95
|
</head>
|
94
96
|
|
@@ -160,6 +162,8 @@
|
|
160
162
|
|
161
163
|
```
|
162
164
|
|
165
|
+
・Index.htmlに指定しているredirect_uriのURLをエンコードした内容に書き直しても同じエラーとなります。
|
166
|
+
|
163
167
|
|
164
168
|
|
165
169
|
### 補足情報
|
6
再修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
GASで作成したWEBページからLINEログインを行い、ページにアクセスするLINEユーザーの情報(ユーザー名等)を取得したいと考えています。
|
4
4
|
|
5
|
-
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、
|
5
|
+
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、下記の「2」で接続が拒否されているようです。
|
6
6
|
|
7
7
|
エラーメッセージから何が誤っているのか判断ができません。
|
8
8
|
|
5
修正内容に誤りがあったため
test
CHANGED
File without changes
|
test
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、~~下記の「3」で接続が拒否されてしまいます。~~下記の「3」で接続が拒否されてしまいます。
|
6
6
|
|
7
|
-
エラーメッセージ
|
7
|
+
エラーメッセージから何が誤っているのか判断ができません。
|
8
8
|
|
9
9
|
何が間違えているのでしょうか?質問させてください。
|
10
10
|
|
@@ -32,7 +32,7 @@
|
|
32
32
|
|
33
33
|
ウェブページへのアクセス不可
|
34
34
|
|
35
|
-
ウェブページ(https://script.google.com
|
35
|
+
ウェブページ(https://access.line.me/oauth2/v2.1/login?loginState=qJTxnUUMn8VCzwMsXCfajn&loginChannelId=xxxxxxxxxx&returnUri=%2Foauth2%2Fv2.1%2Fauthorize%2Fconsent%3Fscope%3Dprofile%2Bopenid%26response_type%3Dcode%26redirect_uri%3Dhttps%253A%252F%252Fscript.google.com%252Fmacros%252Fd%252FGASのスクリプトID%252Fusercallback%26state%3Dxxxxxx%26client_id%3Dxxxxxxxxxx)は次の理由で読み込めませんでした:
|
36
36
|
|
37
37
|
|
38
38
|
|
@@ -74,6 +74,10 @@
|
|
74
74
|
|
75
75
|
index.html
|
76
76
|
|
77
|
+
修正箇所
|
78
|
+
|
79
|
+
~~<meta http-equiv="refresh" content="5;URL=https://access.line.me/oauth2/v2.1/authoriz?response_type=code&client_id=xxxxxxxxxx&redirect_uri=https://script.google.com/macros/d/xxxxxxxxxx/usercallback&state=xxxxxx">~~
|
80
|
+
|
77
81
|
```
|
78
82
|
|
79
83
|
<!DOCTYPE html>
|
@@ -84,7 +88,7 @@
|
|
84
88
|
|
85
89
|
<meta charset="uft-8">
|
86
90
|
|
87
|
-
<meta http-equiv="refresh" content="
|
91
|
+
<meta http-equiv="refresh" content="2;URL=https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id=xxxxxxxxxx&state=xxxxxx&scope=profile%20openid&redirect_uri=https://script.google.com/macros/d/GASのスクリプトID/usercallback">
|
88
92
|
|
89
93
|
</head>
|
90
94
|
|
4
状況に進捗があったため質問内容を修正(下記「2」で止まっていたのが「3」まで進んでエラー)
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,7 +2,11 @@
|
|
2
2
|
|
3
3
|
GASで作成したWEBページからLINEログインを行い、ページにアクセスするLINEユーザーの情報(ユーザー名等)を取得したいと考えています。
|
4
4
|
|
5
|
-
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、下記の「
|
5
|
+
LINE Developersのサイトにあるドキュメントに従って下記の動きとなるように作成を進めていますが、~~下記の「3」で接続が拒否されてしまいます。~~下記の「3」で接続が拒否されてしまいます。
|
6
|
+
|
7
|
+
エラーメッセージは、クエリパラメータに「state」が指定されていないという内容ですが、「state」はソースの通り指定しています。
|
8
|
+
|
9
|
+
何が間違えているのでしょうか?質問させてください。
|
6
10
|
|
7
11
|
|
8
12
|
|
@@ -18,21 +22,23 @@
|
|
18
22
|
|
19
23
|
### 発生している問題・エラーメッセージ
|
20
24
|
|
25
|
+
~~ウェブページへのアクセス不可~~
|
21
26
|
|
27
|
+
~~ウェブページ(https://access.line.me/dialog/oauth/weblogin?response_type=code&client_id=xxxxxxxxxx&redirect_uri=https://script.google.com/macros/d/xxxxxxxxxx/usercallback&state=xxxxxx)は次の理由で読み込めませんでした:~~
|
28
|
+
|
29
|
+
~~net::ERR_BLOCKED_BY_RESPONSE~~
|
22
30
|
|
23
31
|
```
|
24
32
|
|
25
33
|
ウェブページへのアクセス不可
|
26
34
|
|
27
|
-
ウェブページ(https://
|
35
|
+
ウェブページ(https://script.google.com/macros/d/GASのスクリプトID/usercallback?error_description=%27state%27+is+not+specified.&error=invalid_request)は次の理由で読み込めませんでした:
|
28
36
|
|
29
37
|
|
30
38
|
|
31
39
|
net::ERR_BLOCKED_BY_RESPONSE
|
32
40
|
|
33
41
|
```
|
34
|
-
|
35
|
-
|
36
42
|
|
37
43
|
### 該当のソースコード
|
38
44
|
|
@@ -78,7 +84,7 @@
|
|
78
84
|
|
79
85
|
<meta charset="uft-8">
|
80
86
|
|
81
|
-
<meta http-equiv="refresh" content="5;URL=https://access.line.me/
|
87
|
+
<meta http-equiv="refresh" content="5;URL=https://access.line.me/oauth2/v2.1/authoriz?response_type=code&client_id=xxxxxxxxxx&redirect_uri=https://script.google.com/macros/d/xxxxxxxxxx/usercallback&state=xxxxxx">
|
82
88
|
|
83
89
|
</head>
|
84
90
|
|
@@ -124,13 +130,19 @@
|
|
124
130
|
|
125
131
|
```
|
126
132
|
|
133
|
+
LINEkログインのチャネルに設定しているCallback URL
|
127
134
|
|
135
|
+
```
|
136
|
+
|
137
|
+
https://script.google.com/macros/d/GASのスクリプトID/usercallback
|
138
|
+
|
139
|
+
```
|
128
140
|
|
129
141
|
### 試したこと
|
130
142
|
|
131
143
|
・LINEログインのチャネルが開発中となっていたので、公開中に変更するも変わりなしです。
|
132
144
|
|
133
|
-
・2のLINEログインページのURLを直接指定してもエラーとなります。
|
145
|
+
~~・2のLINEログインページのURLを直接指定してもエラーとなります。~~
|
134
146
|
|
135
147
|
・ブラウザをchromeで試してもエラーとなります。
|
136
148
|
|
@@ -158,4 +170,6 @@
|
|
158
170
|
|
159
171
|
参考ドキュメント
|
160
172
|
|
173
|
+
~~https://developers.line.biz/ja/docs/line-login/integrate-line-login-v2/~~
|
174
|
+
|
161
|
-
https://developers.line.biz/ja/docs/line-login/integrate-line-login
|
175
|
+
https://developers.line.biz/ja/docs/line-login/integrate-line-login/
|
3
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,7 +1,3 @@
|
|
1
|
-
### GASからのLINEログインで接続拒否される
|
2
|
-
|
3
|
-
|
4
|
-
|
5
1
|
### 前提・実現したいこと
|
6
2
|
|
7
3
|
GASで作成したWEBページからLINEログインを行い、ページにアクセスするLINEユーザーの情報(ユーザー名等)を取得したいと考えています。
|
@@ -42,7 +38,9 @@
|
|
42
38
|
|
43
39
|
|
44
40
|
|
45
|
-
|
41
|
+
test.gs
|
42
|
+
|
43
|
+
```
|
46
44
|
|
47
45
|
function doGet(e) {
|
48
46
|
|
@@ -68,7 +66,9 @@
|
|
68
66
|
|
69
67
|
|
70
68
|
|
71
|
-
|
69
|
+
index.html
|
70
|
+
|
71
|
+
```
|
72
72
|
|
73
73
|
<!DOCTYPE html>
|
74
74
|
|
@@ -96,7 +96,9 @@
|
|
96
96
|
|
97
97
|
|
98
98
|
|
99
|
-
|
99
|
+
main.html
|
100
|
+
|
101
|
+
```
|
100
102
|
|
101
103
|
<!DOCTYPE html>
|
102
104
|
|
@@ -150,7 +152,7 @@
|
|
150
152
|
|
151
153
|
・Apps Script Runtime : V8
|
152
154
|
|
153
|
-
・
|
155
|
+
・アクセス権限 : Anyone, even anonymous
|
154
156
|
|
155
157
|
|
156
158
|
|
2
test
CHANGED
File without changes
|
test
CHANGED
@@ -134,13 +134,11 @@
|
|
134
134
|
|
135
135
|
・PCのLINEブラウザ、chromeで試してもエラーとなります。
|
136
136
|
|
137
|
-
・「ERR_BLOCKED_BY_RESPONSE」でググるも情報が少なく、いくつかのサイトでiframeの問題の可能性があると見つけたため、test.gsのreturn文を下記の通り変更してみるも変わりなし。
|
137
|
+
・「ERR_BLOCKED_BY_RESPONSE」でググるも情報が少なく、いくつかのサイトでiframeの問題の可能性があると見つけたため、test.gsのreturn文を下記の通り変更してみるも変わりなしです。
|
138
138
|
|
139
139
|
```GAS(test.gs)
|
140
140
|
|
141
141
|
return HtmlService.createTemplateFromFile('index').evaluate().setTitle('INDEX').setXFrameOptionsMode(HtmlService.XFrameOptionsMode.ALLOWALL);
|
142
|
-
|
143
|
-
}
|
144
142
|
|
145
143
|
```
|
146
144
|
|
1
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,8 @@
|
|
1
|
-
### GASからのLINEログインで接続拒否される
|
1
|
+
### GASからのLINEログインで接続拒否される
|
2
2
|
|
3
|
+
|
3
4
|
|
5
|
+
### 前提・実現したいこと
|
4
6
|
|
5
7
|
GASで作成したWEBページからLINEログインを行い、ページにアクセスするLINEユーザーの情報(ユーザー名等)を取得したいと考えています。
|
6
8
|
|