From 1a9a8f7da7806902719faebaf513ba75bfdfa629 Mon Sep 17 00:00:00 2001 From: Rupato Braganza Date: Tue, 18 Feb 2025 17:57:28 +0800 Subject: [PATCH] fix: oidc search param --- src/components/layout/index.tsx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/components/layout/index.tsx b/src/components/layout/index.tsx index 3313b971..9166b2bc 100644 --- a/src/components/layout/index.tsx +++ b/src/components/layout/index.tsx @@ -34,12 +34,23 @@ const Layout = () => { }); useEffect(() => { - if (isLoggedInCookie && !isClientAccountsPopulated && isOAuth2Enabled && !isEndpointPage && !isCallbackPage) { + if ( + (isLoggedInCookie && !isClientAccountsPopulated && isOAuth2Enabled && !isEndpointPage && !isCallbackPage) || + !ifClientAccountHasCurrency + ) { + console.log('requestOidcAuthentication'); requestOidcAuthentication({ redirectCallbackUri: `${window.location.origin}/callback`, }); } - }, [isLoggedInCookie, isClientAccountsPopulated, isOAuth2Enabled, isEndpointPage, isCallbackPage]); + }, [ + isLoggedInCookie, + isClientAccountsPopulated, + isOAuth2Enabled, + isEndpointPage, + isCallbackPage, + ifClientAccountHasCurrency, + ]); return (