uia fallback example: check event origin

pull/977/head
Richard van der Hoff 8 years ago committed by GitHub
parent e850fd718d
commit 6c88d698ae

@ -637,10 +637,11 @@ handle unknown login types:
var popupWindow;
var eventListener = function(ev) {
if (ev.data !== "authDone" ) {
// check it's the right message from the right place.
if (ev.data !== "authDone" || ev.origin !== homeserverUrl) {
return;
}
// close the popup
popupWindow.close();
window.removeEventListener("message", eventListener);

Loading…
Cancel
Save