mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-21 11:35:34 +01:00
Use UserKeyDefinition
for user-scoped data (#8667)
This commit is contained in:
parent
05f22b9cbc
commit
744f3a4d1c
@ -3,18 +3,17 @@ import { CryptoFunctionService } from "../../abstractions/crypto-function.servic
|
||||
import { EncryptService } from "../../abstractions/encrypt.service";
|
||||
import { EncString, EncryptedString } from "../../models/domain/enc-string";
|
||||
import { SymmetricCryptoKey } from "../../models/domain/symmetric-crypto-key";
|
||||
import {
|
||||
KeyDefinition,
|
||||
CRYPTO_DISK,
|
||||
DeriveDefinition,
|
||||
CRYPTO_MEMORY,
|
||||
UserKeyDefinition,
|
||||
} from "../../state";
|
||||
import { CRYPTO_DISK, DeriveDefinition, CRYPTO_MEMORY, UserKeyDefinition } from "../../state";
|
||||
import { CryptoService } from "../crypto.service";
|
||||
|
||||
export const USER_EVER_HAD_USER_KEY = new KeyDefinition<boolean>(CRYPTO_DISK, "everHadUserKey", {
|
||||
deserializer: (obj) => obj,
|
||||
});
|
||||
export const USER_EVER_HAD_USER_KEY = new UserKeyDefinition<boolean>(
|
||||
CRYPTO_DISK,
|
||||
"everHadUserKey",
|
||||
{
|
||||
deserializer: (obj) => obj,
|
||||
clearOn: ["logout"],
|
||||
},
|
||||
);
|
||||
|
||||
export const USER_ENCRYPTED_PRIVATE_KEY = new UserKeyDefinition<EncryptedString>(
|
||||
CRYPTO_DISK,
|
||||
|
Loading…
Reference in New Issue
Block a user