Skip to content

Commit

Permalink
fix: oidc search param
Browse files Browse the repository at this point in the history
  • Loading branch information
rupato-deriv committed Feb 18, 2025
1 parent dd15883 commit 1a9a8f7
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/components/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<div className={clsx('layout', { responsive: isDesktop })}>
Expand Down

0 comments on commit 1a9a8f7

Please sign in to comment.