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:
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user