mirror of
https://github.com/bitwarden/browser
synced 2025-12-17 08:43:33 +00:00
[PM-5537] Biometric State Service (#7761)
* Create state for biometric client key halves * Move enc string util to central utils * Provide biometric state through service * Use biometric state to track client key half * Create migration for client key half * Ensure client key half is removed on logout * Remove account data for client key half * Remove unnecessary key definition likes * Remove moved state from account * Fix null-conditional operator failure * Simplify migration * Remove lame test * Fix test type * Add migrator * Prefer userKey when legacy not needed * Fix tests
This commit is contained in:
13
libs/common/src/platform/biometrics/biometric.state.spec.ts
Normal file
13
libs/common/src/platform/biometrics/biometric.state.spec.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import { ENCRYPTED_CLIENT_KEY_HALF } from "./biometric.state";
|
||||
|
||||
describe("encrypted client key half", () => {
|
||||
const sut = ENCRYPTED_CLIENT_KEY_HALF;
|
||||
|
||||
it("should deserialize encrypted client key half state", () => {
|
||||
const encryptedClientKeyHalf = "encryptedClientKeyHalf";
|
||||
|
||||
const result = sut.deserializer(JSON.parse(JSON.stringify(encryptedClientKeyHalf)));
|
||||
|
||||
expect(result).toEqual(encryptedClientKeyHalf);
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user