Fix key length error
[error] failed to redirect to accounts page: TypeError: invalid key length
This commit is contained in:
parent
6d3d5d03f8
commit
5fe5451f5c
|
@ -14,6 +14,7 @@ import {
|
||||||
ACCOUNTS_PAGES,
|
ACCOUNTS_PAGES,
|
||||||
PHOTOS_PAGES as PAGES,
|
PHOTOS_PAGES as PAGES,
|
||||||
} from "@ente/shared/constants/pages";
|
} from "@ente/shared/constants/pages";
|
||||||
|
import ComlinkCryptoWorker from "@ente/shared/crypto";
|
||||||
import { getRecoveryKey } from "@ente/shared/crypto/helpers";
|
import { getRecoveryKey } from "@ente/shared/crypto/helpers";
|
||||||
import {
|
import {
|
||||||
encryptToB64,
|
encryptToB64,
|
||||||
|
@ -494,9 +495,10 @@ const UtilitySection: React.FC<UtilitySectionProps> = ({ closeSidebar }) => {
|
||||||
|
|
||||||
const resetSecret = await generateEncryptionKey();
|
const resetSecret = await generateEncryptionKey();
|
||||||
|
|
||||||
|
const cryptoWorker = await ComlinkCryptoWorker.getInstance();
|
||||||
const encryptionResult = await encryptToB64(
|
const encryptionResult = await encryptToB64(
|
||||||
resetSecret,
|
resetSecret,
|
||||||
recoveryKey,
|
await cryptoWorker.fromHex(recoveryKey),
|
||||||
);
|
);
|
||||||
|
|
||||||
await configurePasskeyRecovery(
|
await configurePasskeyRecovery(
|
||||||
|
|
Loading…
Reference in a new issue