@@ -583,7 +593,7 @@
class="box-content-row"
appStopClick
(click)="clone()"
- *ngIf="!cipher.organizationId && !cipher.isDeleted"
+ *ngIf="!cipher.organizationId && !cipher.isDeleted && cipher.type != cipherType.Fido2Key"
>
diff --git a/libs/angular/src/components/icon.component.ts b/libs/angular/src/components/icon.component.ts
index 1c9b5a8b551..562986d4718 100644
--- a/libs/angular/src/components/icon.component.ts
+++ b/libs/angular/src/components/icon.component.ts
@@ -65,6 +65,9 @@ export class IconComponent implements OnChanges {
case CipherType.Identity:
this.icon = "bwi-id-card";
break;
+ case CipherType.Fido2Key:
+ this.icon = "bwi-key"; // TODO: Verify if this icon should be classified as "Bitwarden Object"
+ break;
default:
break;
}
diff --git a/libs/common/src/models/view/cipher.view.ts b/libs/common/src/models/view/cipher.view.ts
index c7968e97224..fb452ad5b88 100644
--- a/libs/common/src/models/view/cipher.view.ts
+++ b/libs/common/src/models/view/cipher.view.ts
@@ -78,6 +78,8 @@ export class CipherView implements View, InitializerMetadata {
return this.card;
case CipherType.Identity:
return this.identity;
+ case CipherType.Fido2Key:
+ return this.fido2Key;
default:
break;
}
diff --git a/libs/common/src/models/view/fido2-key.view.ts b/libs/common/src/models/view/fido2-key.view.ts
index 964a893fd11..aa7b4309dcc 100644
--- a/libs/common/src/models/view/fido2-key.view.ts
+++ b/libs/common/src/models/view/fido2-key.view.ts
@@ -1,6 +1,12 @@
-export class Fido2KeyView {
+import { ItemView } from "./item.view";
+
+export class Fido2KeyView extends ItemView {
key: string;
rpId: string;
origin: string;
userHandle: string;
+
+ get subTitle(): string {
+ return null;
+ }
}
diff --git a/libs/common/src/services/fido2/fido2.service.ts b/libs/common/src/services/fido2/fido2.service.ts
index fa3a441304a..098b5659e44 100644
--- a/libs/common/src/services/fido2/fido2.service.ts
+++ b/libs/common/src/services/fido2/fido2.service.ts
@@ -172,6 +172,10 @@ export class Fido2Service implements Fido2ServiceAbstraction {
for (const allowedCredential of allowedCredentialIds) {
cipher = await this.cipherService.get(allowedCredential);
+ if (cipher.deletedDate != undefined) {
+ cipher = undefined;
+ }
+
if (cipher != undefined) {
break;
}
@@ -211,7 +215,7 @@ export class Fido2Service implements Fido2ServiceAbstraction {
private async getCredentialByRp(rpId: string): Promise {
const allCipherViews = await this.cipherService.getAllDecrypted();
const cipherView = allCipherViews.find(
- (cv) => cv.type === CipherType.Fido2Key && cv.fido2Key?.rpId === rpId
+ (cv) => !cv.isDeleted && cv.type === CipherType.Fido2Key && cv.fido2Key?.rpId === rpId
);
if (cipherView == undefined) {