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 (