Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update login flow (#2159)

Leendert de Borstc4c098ab8c72
diff --git a/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx b/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx
index 6fa1bf15d..dd55b3019 100644
--- a/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx
+++ b/apps/browser-extension/src/entrypoints/popup/pages/auth/Login.tsx
@@ -106,8 +106,6 @@ const Login: React.FC = () => {
*/
const encryptionKey = await VaultKeyService.resolveEncryptionKey(passwordHashBase64, webApi);
- // Store the encryption key and derivation params separately
- await dbContext.storeEncryptionKey(encryptionKey);
await dbContext.storeEncryptionKeyDerivationParams({
salt: loginResponse.salt,
encryptionType: loginResponse.encryptionType,
@@ -119,6 +117,7 @@ const Login: React.FC = () => {
// Persist and load the vault.
await persistAndLoadVault(vaultResponseJson, encryptionKey);
+ await dbContext.storeEncryptionKey(encryptionKey);
// Reset prefill flag so next logout will prefill again
usernamePrefillAttempted = false;
diff --git a/apps/browser-extension/tests/fixtures/helpers.ts b/apps/browser-extension/tests/fixtures/helpers.ts
index 60fd17595..d3a49fe30 100644
--- a/apps/browser-extension/tests/fixtures/helpers.ts
+++ b/apps/browser-extension/tests/fixtures/helpers.ts
@@ -70,8 +70,6 @@ const UpgradeSelectors = {
/**
* Walk the vault upgrade gate, if the popup landed on it.
*
- * Test accounts are seeded with a legacy sqlite-blob vault. TODO: update tests to work with native manifest-v1 newly created account.
- *
* @param popup - The popup page
* @param timeout - Timeout in milliseconds for each step of the flow
*/