FIX: stricter `window.opener` checks (#6578)

This commit is contained in:
Kyle Zhao 2018-11-12 17:56:31 -05:00 committed by Sam
parent 3493ea85cc
commit d25ae13f0f
1 changed files with 5 additions and 1 deletions

View File

@ -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 {