This commit is contained in:
Manav Rathi 2024-05-25 16:06:24 +05:30
parent 8d30bfbefa
commit 225278adb7
No known key found for this signature in database
2 changed files with 4 additions and 3 deletions

View file

@ -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) {

View file

@ -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;
}