registerUser method
Future<RegistrationResponse>
registerUser(
- BuildContext? context,
- String? identityProviderId,
- List<
String> ? scopes
Start registration flow.
If identityProviderId is null, starts standard browser registration.
Use your scopes for registration. By default it is "read".
Implementation
Future<RegistrationResponse> registerUser(
BuildContext? context,
String? identityProviderId,
List<String>? scopes,
) async {
Onegini.instance.setEventContext(context);
try {
var response = await Onegini.instance.channel
.invokeMethod(Constants.registerUser, <String, dynamic>{
'scopes': scopes,
'identityProviderId': identityProviderId,
});
return registrationResponseFromJson(response);
} on TypeError catch (error) {
throw PlatformException(
code: Constants.wrapperTypeError.code.toString(),
message: Constants.wrapperTypeError.message,
stacktrace: error.stackTrace?.toString());
}
}