mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 19:18:59 +01:00
Have Loopback Server flow redirect back to VS Code and make it the primary flow (#251333)
* Have Loopback Server flow redirect back to VS Code and make it the primary flow Fixes https://github.com/microsoft/vscode/issues/250086 * Fix test * Fix test * Fix other test
This commit is contained in:
committed by
GitHub
parent
7766411d9f
commit
31620a3dec
@@ -23,13 +23,17 @@
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var search = window.location.search;
|
||||
var error = (/[?&^]error=([^&]+)/.exec(search) || [])[1];
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
var error = urlParams.get('error');
|
||||
if (error) {
|
||||
document.querySelector('.error-text')
|
||||
.textContent = decodeURIComponent(error);
|
||||
.textContent = error;
|
||||
document.querySelector('body')
|
||||
.classList.add('error');
|
||||
} else if (urlParams.get('redirect_uri')) {
|
||||
setTimeout(() => {
|
||||
window.location = urlParams.get('redirect_uri');
|
||||
}, 1000);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user