Skip to content

Commit

Permalink
OAuth2: Implement OAuth 2.0 Implicit Grant - Ignore redirect abortion…
Browse files Browse the repository at this point in the history
… emitted by loadUrl

 usebruno#2056
 usebruno#1959
  • Loading branch information
Mateusz Pietryga authored and pietrygamat committed May 7, 2024
1 parent 406ca82 commit 6873dc8
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -174,6 +174,11 @@ const authorizeUserInWindowImplicit = ({ authorizeUrl, callbackUrl, session }) =
try {
await window.loadURL(authorizeUrl);
} catch (error) {
// If browser redirects before load finished, loadURL throws an error with code ERR_ABORTED. This should be ignored.
if (error.code === 'ERR_ABORTED') {
console.debug('Ignoring ERR_ABORTED during authorizeUserInWindow');
return;
}
reject(error);
window.close();
}
Expand Down

0 comments on commit 6873dc8

Please sign in to comment.