From 3a4dc2147039f7280c040dad1b0625a17cfd9353 Mon Sep 17 00:00:00 2001 From: Manav Rathi Date: Thu, 20 Jun 2024 13:22:36 +0530 Subject: [PATCH] Component state for this component needs refactoring, for now read from source --- web/packages/accounts/pages/credentials.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsx index dc7d9d3092..311152dac9 100644 --- a/web/packages/accounts/pages/credentials.tsx +++ b/web/packages/accounts/pages/credentials.tsx @@ -288,12 +288,14 @@ const Page: React.FC = ({ appContext }) => { // // To cover such cases, we redo the check whenever an incorrect password // is entered. + const srpAttributes: SRPAttributes = getData(LS_KEYS.SRP_ATTRIBUTES); + const user: User = getData(LS_KEYS.USER); if (srpAttributes && user?.email) { void didPasswordChangeElsewhere(user.email, srpAttributes).then( (changed) => changed && showSessionExpiredDialog(), ); } - }, [srpAttributes, user, showSessionExpiredDialog]); + }, [showSessionExpiredDialog]); if (!keyAttributes && !srpAttributes) { return (