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 committed Apr 16, 2024
1 parent cdda9b0 commit 25e8ca2
Showing 1 changed file with 5 additions and 0 deletions.
Expand Up @@ -155,6 +155,11 @@ const authorizeUserInWindowImplicit = ({ authorizeUrl, 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 25e8ca2

Please sign in to comment.