From 763e6a48e9b081b68bdcc18499eec7c8193b6388 Mon Sep 17 00:00:00 2001 From: Candinya Date: Mon, 22 Mar 2021 22:41:17 +0800 Subject: [PATCH] fix: URL problems (like for sub-dir implement users) Just let the loginToken cannot be found twice. --- src/components/LoginPage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/LoginPage.js b/src/components/LoginPage.js index 200ac1b..b13460c 100644 --- a/src/components/LoginPage.js +++ b/src/components/LoginPage.js @@ -92,7 +92,7 @@ const LoginPage = ({ theme }) => { console.log("SSO token is", retToken[1]); localStorage.setItem("sso_ret_token", retToken[1]); console.log("SSO token saved. Reloading the page to prevent loging again."); - window.location.href = window.location.origin; // prevent further requests + window.location.href = window.location.href.replace(retToken[0], ""); // prevent further requests } else if (ssoToken) { const baseUrl = localStorage.getItem("sso_base_url"); localStorage.removeItem("sso_base_url");