register method
Handles the platform-specific steps for the registration flow (see https://webauthn.guide/#registration) Namely it creates a public/private key pair (only the public key will be returned)
Implementation
@override
Future<RegisterResponseType> register(RegisterRequestType request) async {
final userArg = User(name: request.user.name, id: request.user.id);
final relyingPartyArg = RelyingParty(
name: request.relyingParty.name,
id: request.relyingParty.id,
);
final r = await _api.register(
request.challenge,
relyingPartyArg,
userArg,
request.excludeCredentials.map((e) => e.id).toList(),
);
return RegisterResponseType(
id: r.id,
rawId: r.rawId,
clientDataJSON: r.clientDataJSON,
attestationObject: r.attestationObject,
);
}