webAuthnRegister method
Register using WebAuthn/FIDO combination.
Implementation
Future<Map<String, dynamic>?> webAuthnRegister() async {
final json = await _channel.invokeMethod<String>(
WebAuthnMethods.webAuthnRegister.name,
{},
).catchError((error) {
return throw GigyaResponse.fromJson(decodeError(error));
}).timeout(getTimeout(Methods.sendRequest), onTimeout: () {
debugPrint('A timeout that was defined in the request is reached');
return jsonEncode(timeoutError());
});
return json != null ? jsonDecode(json) : null;
}