Skip to content

armgit / ente

Public Imported from GitHub
0

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

Same name

Manav Rathi113b82045186
diff --git a/web/packages/accounts/pages/two-factor/setup.tsx b/web/packages/accounts/pages/two-factor/setup.tsx
index d97f48bf31..2f128d35da 100644
--- a/web/packages/accounts/pages/two-factor/setup.tsx
+++ b/web/packages/accounts/pages/two-factor/setup.tsx
@@ -27,14 +27,14 @@ const Page: React.FC = () => {
}, []);
const handleSubmit = async (otp: string) => {
- const encryptedBox = await encryptBoxB64(
+ const box = await encryptBoxB64(
twoFactorSecret!.secretCode,
await getUserRecoveryKeyB64(),
);
await enableTwoFactor({
code: otp,
- encryptedTwoFactorSecret: encryptedBox.encryptedData,
- twoFactorSecretDecryptionNonce: encryptedBox.nonce,
+ encryptedTwoFactorSecret: box.encryptedData,
+ twoFactorSecretDecryptionNonce: box.nonce,
});
await setLSUser({ ...getData("user"), isTwoFactorEnabled: true });
await router.push(appHomeRoute);
diff --git a/web/packages/accounts/services/passkey.ts b/web/packages/accounts/services/passkey.ts
index 34f3ef769c..e2a749a93e 100644
--- a/web/packages/accounts/services/passkey.ts
+++ b/web/packages/accounts/services/passkey.ts
@@ -108,14 +108,14 @@ export const openAccountsManagePasskeysPage = async () => {
// If not, enable it for them by creating the necessary recovery
// information to prevent them from getting locked out.
const resetSecret = await generateKey();
- const encryptionResult = await encryptBoxB64(
+ const box = await encryptBoxB64(
resetSecret,
await getUserRecoveryKeyB64(),
);
await configurePasskeyRecovery(
resetSecret,
- encryptionResult.encryptedData,
- encryptionResult.nonce,
+ box.encryptedData,
+ box.nonce,
);
}