From 211e172a79f7b4f97d61085e0aa36868663b8d4c Mon Sep 17 00:00:00 2001 From: adrienne-deriv <103016120+adrienne-deriv@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:06:58 +0800 Subject: [PATCH] Adrienne / Revert OIDC changes (#17972) * chore: reverted oidc changes --- packages/core/src/App/AppContent.tsx | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/packages/core/src/App/AppContent.tsx b/packages/core/src/App/AppContent.tsx index 343ace08d689..39f96e7b545b 100644 --- a/packages/core/src/App/AppContent.tsx +++ b/packages/core/src/App/AppContent.tsx @@ -58,7 +58,7 @@ const AppContent: React.FC<{ passthrough: unknown }> = observer(({ passthrough } const { isMobile } = useDevice(); const { switchLanguage } = useTranslations(); - const { isOAuth2Enabled, oAuthLogout } = useOauth2({ + const { isOAuth2Enabled } = useOauth2({ handleLogout: async () => { await logout(); }, @@ -68,11 +68,14 @@ const AppContent: React.FC<{ passthrough: unknown }> = observer(({ passthrough } const is_app_id_set = localStorage.getItem('config.app_id'); const is_change_login_app_id_set = localStorage.getItem('change_login_app_id'); - useSilentLoginAndLogout({ - is_client_store_initialized, - isOAuth2Enabled, - oAuthLogout, - }); + // NOTE: Commented this out for now due to single logout causing Deriv.app to be logged out continously + // There is a case where if logged_state is false coming from other platforms, Deriv app will SLO the user out + // TODO: Revert this once OIDC is enabled back for Deriv.app + // useSilentLoginAndLogout({ + // is_client_store_initialized, + // isOAuth2Enabled, + // oAuthLogout, + // }); const [isWebPasskeysFFEnabled, isGBLoaded] = useGrowthbookIsOn({ featureFlag: 'web_passkeys',