summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorRichard van der Hoff <github@rvanderhoff.org.uk>2016-10-06 19:56:43 +0100
committerGitHub <noreply@github.com>2016-10-06 19:56:43 +0100
commit5d34e32d42704be419fe0b47df6792280781f932 (patch)
tree80a2c2fc75653896ea02a938dd43c4df650554f4 /synapse/rest/client
parentMerge branch 'master' of github.com:matrix-org/synapse into develop (diff)
parentwindow.postmessage for Interactive Auth fallback (diff)
downloadsynapse-5d34e32d42704be419fe0b47df6792280781f932.tar.xz
Merge pull request #1159 from matrix-org/rav/uia_fallback_postmessage
window.postmessage for Interactive Auth fallback
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v2_alpha/auth.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/rest/client/v2_alpha/auth.py b/synapse/rest/client/v2_alpha/auth.py
index 58d3cad6a1..8e5577148f 100644
--- a/synapse/rest/client/v2_alpha/auth.py
+++ b/synapse/rest/client/v2_alpha/auth.py
@@ -77,8 +77,10 @@ SUCCESS_TEMPLATE = """
     user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
 <link rel="stylesheet" href="/_matrix/static/client/register/style.css">
 <script>
-if (window.onAuthDone != undefined) {
+if (window.onAuthDone) {
     window.onAuthDone();
+} else if (window.opener && window.opener.postMessage) {
+     window.opener.postMessage("authDone", "*");
 }
 </script>
 </head>