@@ -62,15 +62,27 @@ async function startCallbackServer(authUrl: string): Promise<{
6262 "Content-Type" : "text/html" ,
6363 } ) ;
6464 res . end ( `
65- <html>
66- <body>
67- <p>${
68- isAccessDenied
69- ? "Authorization cancelled."
70- : `Authorization failed.`
71- } </p>
72- <p>Return to Array. This window will close automatically.</p>
73- <script>window.close();</script>
65+ <!DOCTYPE html>
66+ <html class="radix-themes" data-is-root-theme="true" data-accent-color="orange" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="none" data-scaling="100%">
67+ <head>
68+ <meta charset="utf-8">
69+ <title>Authorization ${ isAccessDenied ? "Cancelled" : "Failed" } </title>
70+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@radix-ui/[email protected] /styles.css"> 71+ <script src="https://cdn.tailwindcss.com"></script>
72+ <style>
73+ @layer utilities {
74+ .text-gray-12 { color: var(--gray-12); }
75+ .text-gray-11 { color: var(--gray-11); }
76+ .bg-gray-1 { background-color: var(--gray-1); }
77+ }
78+ </style>
79+ </head>
80+ <body class="dark bg-gray-1 h-screen overflow-hidden flex flex-col items-center justify-center m-0 gap-2">
81+ <h1 class="text-gray-12 text-xl font-semibold">${ isAccessDenied ? "Authorization cancelled" : "Authorization failed" } </h1>
82+ <p class="text-gray-11 text-sm">You can close this window and return to Array</p>
83+ <script>
84+ setTimeout(() => window.close(), 500);
85+ </script>
7486 </body>
7587 </html>
7688 ` ) ;
@@ -81,21 +93,63 @@ async function startCallbackServer(authUrl: string): Promise<{
8193 if ( code ) {
8294 res . writeHead ( 200 , { "Content-Type" : "text/html" } ) ;
8395 res . end ( `
84- <html>
85- <body>
86- <p>Authorization successful! Return to Array.</p>
87- <script>window.close();</script>
96+ <!DOCTYPE html>
97+ <html class="radix-themes" data-is-root-theme="true" data-accent-color="orange" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="none" data-scaling="100%">
98+ <head>
99+ <meta charset="utf-8">
100+ <title>Authorization Successful</title>
101+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@radix-ui/[email protected] /styles.css"> 102+ <script src="https://cdn.tailwindcss.com"></script>
103+ <style>
104+ @layer utilities {
105+ .text-accent-9 { color: var(--accent-9); }
106+ .text-green-9 { color: var(--green-9); }
107+ .text-gray-11 { color: var(--gray-11); }
108+ .text-gray-12 { color: var(--gray-12); }
109+ .bg-gray-1 { background-color: var(--gray-1); }
110+ .bg-green-9 { background-color: var(--green-9); }
111+ .border-gray-6 { border-color: var(--gray-6); }
112+ }
113+ </style>
114+ </head>
115+ <body class="dark bg-gray-1 h-screen overflow-hidden flex flex-col items-center justify-center m-0 gap-2">
116+ <h1 class="text-gray-12 text-xl font-semibold">Authorization successful!</h1>
117+ <p class="text-gray-11 text-sm">You can close this window and return to Array</p>
118+ <script>
119+ setTimeout(() => window.close(), 500);
120+ </script>
88121 </body>
89122 </html>
90123 ` ) ;
91124 callbackResolve ( code ) ;
92125 } else {
93126 res . writeHead ( 400 , { "Content-Type" : "text/html" } ) ;
94127 res . end ( `
95- <html>
96- <body>
97- <p>Invalid request - no authorization code received.</p>
98- <p>You can close this window.</p>
128+ <!DOCTYPE html>
129+ <html class="radix-themes" data-is-root-theme="true" data-accent-color="orange" data-gray-color="slate" data-has-background="true" data-panel-background="translucent" data-radius="none" data-scaling="100%">
130+ <head>
131+ <meta charset="utf-8">
132+ <title>Invalid Request</title>
133+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@radix-ui/[email protected] /styles.css"> 134+ <script src="https://cdn.tailwindcss.com"></script>
135+ <style>
136+ @layer utilities {
137+ .text-accent-9 { color: var(--accent-9); }
138+ .text-red-9 { color: var(--red-9); }
139+ .text-gray-11 { color: var(--gray-11); }
140+ .text-gray-12 { color: var(--gray-12); }
141+ .bg-gray-1 { background-color: var(--gray-1); }
142+ .bg-gray-12 { background-color: var(--gray-12); }
143+ .border-gray-6 { border-color: var(--gray-6); }
144+ }
145+ </style>
146+ </head>
147+ <body class="dark bg-gray-1 h-screen overflow-hidden flex flex-col items-center justify-center m-0 gap-2">
148+ <h1 class="text-gray-12 text-xl font-semibold">Invalid request</h1>
149+ <p class="text-gray-11 text-sm">You can close this window and return to Array</p>
150+ <script>
151+ setTimeout(() => window.close(), 500);
152+ </script>
99153 </body>
100154 </html>
101155 ` ) ;
@@ -229,7 +283,6 @@ export async function performOAuthFlow(
229283
230284 activeCloseServer = closeServer ;
231285
232- // Open browser
233286 await shell . openExternal ( localLoginUrl ) ;
234287
235288 try {
0 commit comments