fix(dropbox): OAuth to use postMessage.

This commit is contained in:
Hristo Terezov
2021-12-01 13:15:17 -06:00
committed by Дамян Минков
parent 591eab7c97
commit 827e8201d4
2 changed files with 18 additions and 22 deletions

View File

@@ -8,17 +8,11 @@
<script>
(function() {
var windowName = window.name;
var parentWindow = window.opener;
if (parentWindow
&& parentWindow.JitsiMeetJS
&& parentWindow.JitsiMeetJS.app) {
var globalNS = parentWindow.JitsiMeetJS.app;
if (globalNS.oauthCallbacks
&& typeof globalNS.oauthCallbacks[windowName]
=== 'function') {
globalNS.oauthCallbacks[windowName](window.location.href);
}
}
window.opener && window.opener.postMessage({
type: 'dropbox-login',
windowName,
url: window.location.href
}, window.location.origin);
})();
</script>
</head>