diff --git a/libs/common/src/services/fido2/fido2.service.ts b/libs/common/src/services/fido2/fido2.service.ts index 2c7e1a98310..6fc8f7ea2f3 100644 --- a/libs/common/src/services/fido2/fido2.service.ts +++ b/libs/common/src/services/fido2/fido2.service.ts @@ -107,8 +107,6 @@ export class Fido2Service implements Fido2ServiceAbstraction { } async assertCredential(params: CredentialAssertParams): Promise { - const presence = await this.fido2UserInterfaceService.verifyPresence(); - let credential: BitCredential | undefined; if (params.allowedCredentialIds && params.allowedCredentialIds.length > 0) { @@ -127,6 +125,8 @@ export class Fido2Service implements Fido2ServiceAbstraction { throw new OriginMismatchError(); } + const presence = await this.fido2UserInterfaceService.verifyPresence(); + const encoder = new TextEncoder(); const clientData = encoder.encode( JSON.stringify({