File tree 2 files changed +29
-0
lines changed
2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ exports . handler = function ( event , context , callback ) {
2
+ callback ( null , {
3
+ statusCode : 200 ,
4
+ header : {
5
+ "Content-Type" : "text/html"
6
+ } ,
7
+ body : `
8
+ <html>
9
+ <body>
10
+ <script>
11
+ function getParameterByName(name, url_string) {
12
+ var url = new URL(url_string);
13
+ var c = url.searchParams.get("code");
14
+ return c;
15
+ }
16
+
17
+ (function Callback() {
18
+ let githubCode = getParameterByName("code", window.location.href);
19
+ console.log(githubCode)
20
+ let targetWindow = window.opener;
21
+ targetWindow.postMessage(githubCode, "*");
22
+ })()
23
+ </script>
24
+ </body>
25
+ </html>
26
+ `
27
+ } ) ;
28
+ } ;
Original file line number Diff line number Diff line change 1
1
[build ]
2
2
command = " yarn site build"
3
3
publish = " ./oss/public"
4
+ functions = " ./.netlify/functions"
4
5
5
6
[build .environment ]
6
7
NODE_VERSION = " v11.14.0"
You can’t perform that action at this time.
0 commit comments