diff options
author | Alexander Trost <galexrt@googlemail.com> | 2019-06-02 18:13:20 +0200 |
---|---|---|
committer | Alexander Trost <galexrt@googlemail.com> | 2019-06-02 18:14:40 +0200 |
commit | dc3e58693816b897c612ea2b1d5a9f0656108d7d (patch) | |
tree | cd6c370c809f4d97b45a2831631117f87133a72a /synapse/static | |
parent | Merge pull request #5309 from matrix-org/rav/limit_displayname_length (diff) | |
download | synapse-dc3e58693816b897c612ea2b1d5a9f0656108d7d.tar.xz |
SAML2 Improvements and redirect stuff
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
Diffstat (limited to 'synapse/static')
-rw-r--r-- | synapse/static/client/login/js/login.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/static/client/login/js/login.js b/synapse/static/client/login/js/login.js index e02663f50e..9b9e73c41b 100644 --- a/synapse/static/client/login/js/login.js +++ b/synapse/static/client/login/js/login.js @@ -56,6 +56,7 @@ var show_login = function() { } if (matrixLogin.serverAcceptsSso) { + $("#sso_form").attr("action", "/_matrix/client/r0/login/sso/redirect"); $("#sso_flow").show(); } else if (matrixLogin.serverAcceptsCas) { $("#sso_form").attr("action", "/_matrix/client/r0/login/cas/redirect"); @@ -79,7 +80,7 @@ var fetch_info = function(cb) { $.get(matrixLogin.endpoint, function(response) { var serverAcceptsPassword = false; var serverAcceptsCas = false; - for (var i=0; i<response.flows.length; i++) { + for (var i = 0; i < response.flows.length; i++) { var flow = response.flows[i]; if ("m.login.cas" === flow.type) { matrixLogin.serverAcceptsCas = true; @@ -121,6 +122,7 @@ matrixLogin.onLogin = function(response) { // clobber this function console.log("onLogin - This function should be replaced to proceed."); console.log(response); + alert("Login successful!"); }; var parseQsFromUrl = function(query) { @@ -143,7 +145,7 @@ var try_token = function() { if (pos == -1) { return false; } - var qs = parseQsFromUrl(window.location.href.substr(pos+1)); + var qs = parseQsFromUrl(window.location.href.substr(pos + 1)); var loginToken = qs.loginToken; |