Skip to content

Commit 8bd52a1

Browse files
Redirect to vscode.dev/redirect and then vscode://.... (microsoft#254841)
So that the browser remembers who triggered the redirect. Fixes microsoft#254810
1 parent 0f51f42 commit 8bd52a1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

extensions/github-authentication/media/index.html

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,17 @@ <h1 class="title">Launching <span class="app-name"></span></h1>
4747
document.querySelector('.error-message > .detail').textContent = error;
4848
document.querySelector('body').classList.add('error');
4949
} 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)}`;
5052
// Set up the fallback link
5153
const fallbackLink = document.getElementById('fallback-link');
5254
if (fallbackLink) {
53-
fallbackLink.href = redirectUri;
55+
fallbackLink.href = wrappedRedirectUri;
5456
}
5557

5658
// Redirect after a delay
5759
setTimeout(() => {
58-
window.location = redirectUri;
60+
window.location = wrappedRedirectUri;
5961
}, 1000);
6062
}
6163
</script>

0 commit comments

Comments
 (0)