Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.
Update SrpAuthService.ts
Leendert de Borst2edb0828ab9a
diff --git a/core/client/src/auth/SrpAuthService.ts b/core/client/src/auth/SrpAuthService.tsindex 65ff0f2f1..24c2dda98 100644--- a/core/client/src/auth/SrpAuthService.ts+++ b/core/client/src/auth/SrpAuthService.ts@@ -349,10 +349,10 @@ export class SrpAuthService {*/public static async prepareNewPassword(password: string, srpIdentity: string): Promise<NewPasswordMaterial> {const salt = await SrpAuthService.generateSalt();- const credentials = await SrpAuthService.prepareCredentials(password, salt, DEFAULT_ENCRYPTION.type, DEFAULT_ENCRYPTION.settings);- const privateKey = await SrpAuthService.derivePrivateKey(salt, srpIdentity, credentials.passwordHashString);+ const unlockKeyBase64 = bytesToBase64(await argon2DeriveKey(password, salt, DEFAULT_ENCRYPTION.settings));+ const privateKey = await SrpAuthService.derivePrivateKey(salt, srpIdentity, await SrpAuthService.srpPasswordHash(unlockKeyBase64, DEFAULT_ENCRYPTION.type));const verifier = await SrpAuthService.deriveVerifier(privateKey);- return { salt, verifier, encryptionType: DEFAULT_ENCRYPTION.type, encryptionSettings: DEFAULT_ENCRYPTION.settings, unlockKeyBase64: credentials.unlockKeyBase64 };+ return { salt, verifier, encryptionType: DEFAULT_ENCRYPTION.type, encryptionSettings: DEFAULT_ENCRYPTION.settings, unlockKeyBase64 };}/**