From 772e1826b5eaab6b163d729dbaa6b4a3f8c27b92 Mon Sep 17 00:00:00 2001 From: ayeshoali Date: Wed, 27 Nov 2024 16:19:38 +0500 Subject: [PATCH] fix: fixed duplicate event firing on post SSO login registration --- src/login/LoginPage.jsx | 5 ++++- src/register/RegistrationPage.jsx | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/login/LoginPage.jsx b/src/login/LoginPage.jsx index 27b97e60f..b21d1a9c5 100644 --- a/src/login/LoginPage.jsx +++ b/src/login/LoginPage.jsx @@ -160,7 +160,10 @@ const LoginPage = (props) => { webElementText: ELEMENT_TEXT.SIGN_IN, webElementName: ELEMENT_NAME.SIGN_IN, }; - dispatch(setCohesionEventStates(eventData)); + if (currentProvider) { + dispatch(setCohesionEventStates(eventData)); + } + if (showResetPasswordSuccessBanner) { props.dismissPasswordResetBanner(); } diff --git a/src/register/RegistrationPage.jsx b/src/register/RegistrationPage.jsx index 16d0e0b1b..5407ca859 100644 --- a/src/register/RegistrationPage.jsx +++ b/src/register/RegistrationPage.jsx @@ -278,7 +278,9 @@ const RegistrationPage = (props) => { webElementText: ELEMENT_TEXT.CREATE_ACCOUNT, webElementName: ELEMENT_NAME.CREATE_ACCOUNT, }; - dispatch(setCohesionEventStates(eventData)); + if (currentProvider) { + dispatch(setCohesionEventStates(eventData)); + } registerUser(); };