Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

tsc

Manav Rathi225278adb774
diff --git a/web/packages/accounts/pages/credentials.tsx b/web/packages/accounts/pages/credentials.tsx
index fee34311fd..4ac608109d 100644
--- a/web/packages/accounts/pages/credentials.tsx
+++ b/web/packages/accounts/pages/credentials.tsx
@@ -150,7 +150,7 @@ export default function Credentials({ appContext, appName }: PageProps) {
id,
twoFactorSessionID,
passkeySessionID,
- } = await loginViaSRP(srpAttributes, kek);
+ } = await loginViaSRP(ensure(srpAttributes), kek);
setIsFirstLogin(true);
if (passkeySessionID) {
const sessionKeyAttributes =
@@ -195,7 +195,8 @@ export default function Credentials({ appContext, appName }: PageProps) {
id,
isTwoFactorEnabled: false,
});
- setData(LS_KEYS.KEY_ATTRIBUTES, ensure(keyAttributes));
+ if (keyAttributes)
+ setData(LS_KEYS.KEY_ATTRIBUTES, keyAttributes);
return keyAttributes;
}
} catch (e) {
diff --git a/web/packages/shared/components/VerifyMasterPasswordForm.tsx b/web/packages/shared/components/VerifyMasterPasswordForm.tsx
index c84761d3f2..eab20f5beb 100644
--- a/web/packages/shared/components/VerifyMasterPasswordForm.tsx
+++ b/web/packages/shared/components/VerifyMasterPasswordForm.tsx
@@ -20,7 +20,7 @@ export interface VerifyMasterPasswordFormProps {
) => void;
buttonText: string;
submitButtonProps?: ButtonProps;
- getKeyAttributes?: (kek: string) => Promise<KeyAttributes>;
+ getKeyAttributes?: (kek: string) => Promise<KeyAttributes | undefined>;
srpAttributes?: SRPAttributes;
}