Component state for this component needs refactoring, for now read from source

This commit is contained in:
Manav Rathi
2024-06-20 13:22:36 +05:30
parent ce3233a01f
commit 3a4dc21470

View File

@@ -288,12 +288,14 @@ const Page: React.FC<PageProps> = ({ 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 (