From 4860f242d3b9b348fd15cd7ac375357e19f8ab87 Mon Sep 17 00:00:00 2001 From: Himanshu Mishra Date: Thu, 20 May 2021 14:02:17 +0200 Subject: [PATCH] signinpage: always execute login logic on component load Signed-off-by: Himanshu Mishra --- packages/core/src/layout/SignInPage/SignInPage.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/core/src/layout/SignInPage/SignInPage.tsx b/packages/core/src/layout/SignInPage/SignInPage.tsx index 781700fa42..cfe543f9ab 100644 --- a/packages/core/src/layout/SignInPage/SignInPage.tsx +++ b/packages/core/src/layout/SignInPage/SignInPage.tsx @@ -89,7 +89,7 @@ export const SingleSignInPage = ({ const [autoShowPopup, setAutoShowPopup] = useState(auto ?? false); // Defaults to true so that an initial check for existing user session is made - const [retry, setRetry] = useState<{} | boolean | undefined>(true); + const [retry, setRetry] = useState<{} | boolean | undefined>(undefined); const [error, setError] = useState(); // The SignIn component takes some time to decide whether the user is logged-in or not. @@ -139,9 +139,7 @@ export const SingleSignInPage = ({ } }; - if (retry) { - login(); - } + login(); }, [onResult, authApi, retry, autoShowPopup]); return showLoginPage ? (