1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-18 01:03:35 +00:00

[EC-598] feat: confirm new credentials

This commit is contained in:
Andreas Coroiu
2022-12-16 10:13:52 +01:00
parent 1d8dfaaf8d
commit 1ca9d73f10
9 changed files with 79 additions and 18 deletions

View File

@@ -1,4 +1,5 @@
export abstract class Fido2UserInterfaceService {
verifyUser: () => Promise<boolean>;
verifyPresence: () => Promise<boolean>;
confirmNewCredential: () => Promise<boolean>;
}

View File

@@ -8,7 +8,7 @@ export class Fido2Service implements Fido2ServiceAbstraction {
constructor(private fido2UserInterfaceService: Fido2UserInterfaceService) {}
async createCredential(params: CredentialRegistrationParams): Promise<unknown> {
await this.fido2UserInterfaceService.verifyPresence();
await this.fido2UserInterfaceService.confirmNewCredential();
// eslint-disable-next-line no-console
console.log("Fido2Service.registerCredential", params);
return "createCredential response";

View File

@@ -8,4 +8,8 @@ export class Fido2UserInterfaceService implements Fido2UserInterfaceServiceAbstr
async verifyPresence(): Promise<boolean> {
return false;
}
async confirmNewCredential(): Promise<boolean> {
return false;
}
}