make redirect URI also work if index.html is called specifically
authorRobert Kaiser <kairo@kairo.at>
Tue, 3 Oct 2017 16:48:24 +0000 (18:48 +0200)
committerRobert Kaiser <kairo@kairo.at>
Tue, 3 Oct 2017 16:48:24 +0000 (18:48 +0200)
js/ui.js

index d8953ad..02e2947 100644 (file)
--- a/js/ui.js
+++ b/js/ui.js
@@ -135,7 +135,7 @@ function startLogin() {
 }
 
 function getRedirectURI() {
-  return window.location.protocol + '//' + window.location.host + window.location.pathname + "login.html";
+  return window.location.protocol + '//' + window.location.host + window.location.pathname.replace("index.html", "") + "login.html";
 }
 
 function doLogout() {