1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 17:23:37 +00:00

[EC-598] feat: show user name as sub title

This commit is contained in:
Andreas Coroiu
2023-01-05 16:56:33 +01:00
parent da163992d7
commit ac4389743a
8 changed files with 35 additions and 11 deletions

View File

@@ -33,9 +33,10 @@ export class Fido2Component implements OnInit, OnDestroy {
if (this.data?.type === "ConfirmNewCredentialRequest") {
const cipher = new CipherView();
cipher.name = this.data.name;
cipher.name = this.data.credentialName;
cipher.type = CipherType.Fido2Key;
cipher.fido2Key = new Fido2KeyView();
cipher.fido2Key.userName = this.data.userName;
this.ciphers = [cipher];
} else if (this.data?.type === "ConfirmCredentialRequest") {
const cipher = await this.cipherService.get(this.data.cipherId);

View File

@@ -30,7 +30,8 @@ export type BrowserFido2Message = { requestId: string } & (
}
| {
type: "ConfirmNewCredentialRequest";
name: string;
credentialName: string;
userName: string;
}
| {
type: "ConfirmNewCredentialResponse";
@@ -115,9 +116,14 @@ export class BrowserFido2UserInterfaceService implements Fido2UserInterfaceServi
return response.cipherId;
}
async confirmNewCredential({ name }: NewCredentialParams): Promise<boolean> {
async confirmNewCredential({ credentialName, userName }: NewCredentialParams): Promise<boolean> {
const requestId = Utils.newGuid();
const data: BrowserFido2Message = { type: "ConfirmNewCredentialRequest", requestId, name };
const data: BrowserFido2Message = {
type: "ConfirmNewCredentialRequest",
requestId,
credentialName,
userName,
};
const queryParams = new URLSearchParams({ data: JSON.stringify(data) }).toString();
this.popupUtilsService.popOut(
null,