@codingame/monaco-vscode-github-authentication-default-extension 19.1.4 → 20.0.1

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.
@@ -47,15 +47,17 @@
47
47
  document.querySelector('.error-message > .detail').textContent = error;
48
48
  document.querySelector('body').classList.add('error');
49
49
  } else if (redirectUri) {
50
+ // Wrap the redirect URI so that the browser remembers who triggered the redirect
51
+ const wrappedRedirectUri = `https://vscode.dev/redirect?url=${encodeURIComponent(redirectUri)}`;
50
52
  // Set up the fallback link
51
53
  const fallbackLink = document.getElementById('fallback-link');
52
54
  if (fallbackLink) {
53
- fallbackLink.href = redirectUri;
55
+ fallbackLink.href = wrappedRedirectUri;
54
56
  }
55
57
 
56
58
  // Redirect after a delay
57
59
  setTimeout(() => {
58
- window.location = redirectUri;
60
+ window.location = wrappedRedirectUri;
59
61
  }, 1000);
60
62
  }
61
63
  </script>