mirror of
https://github.com/streetwriters/notesnook.git
synced 2026-09-02 04:01:43 +02:00
web: allow clearing keystore
This commit is contained in:
@@ -355,6 +355,13 @@ class KeyStore extends BaseStore<KeyStore> {
|
||||
else return JSON.parse(decoder.decode(decryptedBlob)).value as Secrets[T];
|
||||
};
|
||||
|
||||
clear = async () => {
|
||||
await this.#metadataStore.clear();
|
||||
await this.#secretStore.clear();
|
||||
this.#key = undefined;
|
||||
this.set({ credentials: [], secrets: {}, isLocked: false });
|
||||
};
|
||||
|
||||
private update = async (
|
||||
query: CredentialQuery,
|
||||
patch: (c: SerializableCredential) => void
|
||||
|
||||
Reference in New Issue
Block a user