Skip to content

Commit

Permalink
fix(oauth): prevent false warning when opening Google OAuth
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed May 17, 2024
1 parent 2f0fa92 commit 22723f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/reader-activation/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -631,12 +631,12 @@ window.newspackRAS.push( function ( readerActivation ) {
} else if ( authWindow ) {
authWindow.location = data;
const interval = setInterval( () => {
if ( ! googleOAuthSuccess ) {
if ( ! googleOAuthSuccess && authWindow.closed ) {
if ( googleLoginForm?.endLoginFlow ) {
googleLoginForm.endLoginFlow( newspack_reader_auth_labels.login_canceled, 401 );
}
clearInterval( interval );
}
clearInterval( interval );
}, 500 );
} else if ( googleLoginForm?.endLoginFlow ) {
googleLoginForm.endLoginFlow( newspack_reader_auth_labels.blocked_popup );
Expand Down

0 comments on commit 22723f2

Please sign in to comment.