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:
@@ -1,4 +1,5 @@
|
||||
export abstract class Fido2UserInterfaceService {
|
||||
verifyUser: () => Promise<boolean>;
|
||||
verifyPresence: () => Promise<boolean>;
|
||||
confirmNewCredential: () => Promise<boolean>;
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -8,4 +8,8 @@ export class Fido2UserInterfaceService implements Fido2UserInterfaceServiceAbstr
|
||||
async verifyPresence(): Promise<boolean> {
|
||||
return false;
|
||||
}
|
||||
|
||||
async confirmNewCredential(): Promise<boolean> {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user