extract domains from redirect URIs, fall back to client ID when that is not present
[authserver.git] / authsystem.js
index faaf975c36c48f34adcc97495bdd3f535f20bdc8..7a24d84af4b5efde87be187e217d3256c78ffedf 100644 (file)
@@ -23,4 +23,23 @@ window.onload = function() {
       loginForm.setAttribute("class", "loginarea");
     }
   }
+  var cancelAuth = document.getElementById("cancelauth");
+  if (cancelAuth) {
+    cancelAuth.onclick = function() {
+      document.getElementById("isauthorized").value = "no";
+      document.getElementById("loginauthform").submit();
+    }
+  }
+  var addAnotherEmail = document.getElementById("addanotheremail");
+  if (addAnotherEmail) {
+    addAnotherEmail.onclick = function() {
+      location.href = "./?addemail";
+    }
+  }
+  var isNotMe = document.getElementById("isnotme");
+  if (isNotMe) {
+    isNotMe.onclick = function() {
+      location.href = location.href + "&logout=1";
+    }
+  }
 }