mirror of
https://github.com/bitwarden/browser
synced 2025-12-22 11:13:46 +00:00
[EC-598] feat: add fido2Key to cipher
This commit is contained in:
@@ -84,7 +84,7 @@ export class Fido2Service implements Fido2ServiceAbstraction {
|
||||
})
|
||||
);
|
||||
|
||||
this.credentials.set(credentialId.encoded, {
|
||||
await this.saveCredential({
|
||||
credentialId,
|
||||
keyPair,
|
||||
origin: params.origin,
|
||||
@@ -170,6 +170,10 @@ export class Fido2Service implements Fido2ServiceAbstraction {
|
||||
return credential;
|
||||
}
|
||||
|
||||
private async saveCredential(credential: BitCredential): Promise<void> {
|
||||
this.credentials.set(credential.credentialId.encoded, credential);
|
||||
}
|
||||
|
||||
private getCredentialByRp(rpId: string): BitCredential | undefined {
|
||||
for (const credential of this.credentials.values()) {
|
||||
if (credential.rpId === rpId) {
|
||||
|
||||
Reference in New Issue
Block a user