authenticate method
Handles the platform-specific steps for the authentication flow (see https://webauthn.guide/#authentication) Namely it creates a signature for the challenge issued by the relying party
Implementation
@override
Future<AuthenticateResponseType> authenticate(
AuthenticateRequestType request,
) async {
var conditionalUI = false;
if (request.mediation == MediationType.Conditional) {
conditionalUI = true;
}
final r = await _api.authenticate(
request.relyingPartyId,
request.challenge,
conditionalUI,
request.allowCredentials?.map((e) => e.id).toList() ?? [],
);
return AuthenticateResponseType(
id: r.id,
rawId: r.rawId,
clientDataJSON: r.clientDataJSON,
authenticatorData: r.authenticatorData,
signature: r.signature,
userHandle: r.userHandle,
);
}