1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-14 15:33:55 +00:00

Implement rust fido2 for desktop mac and linux

This commit is contained in:
Bernd Schoolmann
2024-11-29 16:44:42 +01:00
parent d76b5b672c
commit 2f0c1610d9
15 changed files with 506 additions and 9 deletions

View File

@@ -121,6 +121,22 @@ export class TwoFactorAuthWebAuthnComponent implements OnInit, OnDestroy {
return;
}
if (this.platformUtilsService.supportsNativeWebauthn()) {
const challenge = providerData.challenge;
const rpId = providerData.rpId;
const creds = providerData.allowCredentials as any as Array<string>;
const credentials = creds.map((c: any) => {
return c.id;
});
const resp = await this.platformUtilsService.performNativeWebauthnAuthentication(
challenge,
credentials,
rpId,
);
this.token.emit(resp);
return;
}
this.webAuthn.init(providerData);
}