Skip to content

Commit

Permalink
fix: Support Master Password authentication via env variable (#229)
Browse files Browse the repository at this point in the history
The original [PR](#223) for
this wasn't tested and did not work this PR fixes it, I've tested the
changes this time.
  • Loading branch information
neo773 authored Mar 26, 2024
1 parent f60ec5d commit f0c18e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/modules/crypto/keychainManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ const getLocalConfigurationWithoutKeychain = async (
serverKey = await perform2FAVerification({ login, deviceAccessKey: deviceConfiguration.accessKey });
masterPassword = serverKey ?? '';
}

masterPassword += await askMasterPassword();
const masterPasswordEnv = process.env.DASHLANE_MASTER_PASSWORD;
masterPassword += masterPasswordEnv ?? (await askMasterPassword());

const derivate = await getDerivateUsingParametersFromEncryptedData(
masterPassword,
Expand Down

0 comments on commit f0c18e8

Please sign in to comment.