pinokiod 7.1.63 → 7.1.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -591,21 +591,6 @@
|
|
|
591
591
|
.replace(/=/g, '');
|
|
592
592
|
}
|
|
593
593
|
|
|
594
|
-
async function openAuthInBrowser(authUrl) {
|
|
595
|
-
const response = await fetch('/go', {
|
|
596
|
-
method: 'POST',
|
|
597
|
-
headers: { 'Content-Type': 'application/json' },
|
|
598
|
-
body: JSON.stringify({ url: authUrl })
|
|
599
|
-
});
|
|
600
|
-
if (!response.ok) {
|
|
601
|
-
throw new Error(`Browser launch failed with status ${response.status}`);
|
|
602
|
-
}
|
|
603
|
-
const payload = await response.json().catch(() => ({}));
|
|
604
|
-
if (payload && payload.error) {
|
|
605
|
-
throw new Error(payload.error);
|
|
606
|
-
}
|
|
607
|
-
}
|
|
608
|
-
|
|
609
594
|
// OAuth functions
|
|
610
595
|
async function login() {
|
|
611
596
|
try {
|
|
@@ -639,7 +624,7 @@
|
|
|
639
624
|
startSecureConnectPolling();
|
|
640
625
|
setStatus(`Continue the ${name} login in your browser.`, 'warning');
|
|
641
626
|
try {
|
|
642
|
-
|
|
627
|
+
window.open(authUrl, '_blank', 'browser');
|
|
643
628
|
} catch (openError) {
|
|
644
629
|
stopSecureConnectPolling(`Could not open the browser automatically. Please open ${authUrl} manually.`, 'error');
|
|
645
630
|
return;
|