File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 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 11[build ]
22 command = " yarn site build"
33 publish = " ./oss/public"
4+ functions = " ./.netlify/functions"
45
56[build .environment ]
67 NODE_VERSION = " v11.14.0"
You can’t perform that action at this time.
0 commit comments