uiaRequestBackground<T> method
Run any request and react on user interactive authentication flows here.
Implementation
Future<T> uiaRequestBackground<T>(
Future<T> Function(AuthenticationData? auth) request) {
final completer = Completer<T>();
UiaRequest? uia;
uia = UiaRequest(
request: request,
onUpdate: (state) {
if (uia != null) {
if (state == UiaRequestState.done) {
completer.complete(uia.result);
} else if (state == UiaRequestState.fail) {
completer.completeError(uia.error!);
} else {
onUiaRequest.add(uia);
}
}
},
);
return completer.future;
}