switch the encryption secret from localStorage to IndexedDB (because localStorage gets lost so often)

This commit is contained in:
2024-12-08 19:34:31 -07:00
parent ed4a9e581b
commit 251649e6fe
35 changed files with 295 additions and 255 deletions

View File

@@ -515,6 +515,7 @@ async function getNotificationCount() {
const identity = activeAccount && activeAccount["identity"];
if (identity && "secret" in self) {
// get the "secret" pulled in additional-scripts.js to decrypt the "identity" inside the IndexedDB; see account.ts
const secret = self.secret;
const secretUint8Array = self.decodeBase64(secret);
const messageWithNonceAsUint8Array = self.decodeBase64(identity);