Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update SqliteClient.tsx to also mark passkey as soft deleted when credential is deleted (#520)

Leendert de Borsta4d728c9e56c
diff --git a/apps/mobile-app/utils/SqliteClient.tsx b/apps/mobile-app/utils/SqliteClient.tsx
index 581b51599..9393b8b9c 100644
--- a/apps/mobile-app/utils/SqliteClient.tsx
+++ b/apps/mobile-app/utils/SqliteClient.tsx
@@ -389,9 +389,16 @@ class SqliteClient {
WHERE Id = ?
)`;
+ const passkeyQuery = `
+ UPDATE Passkeys
+ SET IsDeleted = 1,
+ UpdatedAt = ?
+ WHERE CredentialId = ?`;
+
const results = await this.executeUpdate(query, [currentDateTime, credentialId]);
await this.executeUpdate(aliasQuery, [currentDateTime, credentialId]);
await this.executeUpdate(serviceQuery, [currentDateTime, credentialId]);
+ await this.executeUpdate(passkeyQuery, [currentDateTime, credentialId]);
await NativeVaultManager.commitTransaction();
return results;