Skip to content

Commit

Permalink
Merge pull request #283 from rupato-deriv/fix--oidc-removed-serach-param
Browse files Browse the repository at this point in the history
fix: oidc search param
  • Loading branch information
rupato-deriv authored Feb 18, 2025
2 parents dd15883 + 1a9a8f7 commit 5f5a61e
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 5f5a61e

Please sign in to comment.