diff --git a/app/assets/javascripts/omniauth-complete.js.no-module.es6 b/app/assets/javascripts/omniauth-complete.js.no-module.es6 index b04fbb013b9..7be373d50f4 100644 --- a/app/assets/javascripts/omniauth-complete.js.no-module.es6 +++ b/app/assets/javascripts/omniauth-complete.js.no-module.es6 @@ -4,7 +4,11 @@ ).dataset; const parsedAuthResult = JSON.parse(authResult); - if (!window.opener) { + if ( + !window.opener || + !window.opener.Discourse || + !window.opener.Discourse.authenticationComplete + ) { localStorage.setItem("lastAuthResult", authResult); window.location.href = `${baseUrl}?authComplete=true`; } else {