authenticateUser method
Future<RegistrationResponse>
authenticateUser(
- BuildContext? context,
- String? registeredAuthenticatorId
Starts authentication flow.
If registeredAuthenticatorId is null, starts authentication by default authenticator.
Usually it is Pin authenticator.
Implementation
Future<RegistrationResponse> authenticateUser(
BuildContext? context,
String? registeredAuthenticatorId,
) async {
Onegini.instance.setEventContext(context);
try {
var response = await Onegini.instance.channel
.invokeMethod(Constants.authenticateUser, <String, String?>{
'registeredAuthenticatorId': registeredAuthenticatorId,
});
return registrationResponseFromJson(response);
} on TypeError catch (error) {
throw PlatformException(
code: Constants.wrapperTypeError.code.toString(),
message: Constants.wrapperTypeError.message,
stacktrace: error.stackTrace?.toString());
}
}