diff --git a/lib/src/utils/uia_request.dart b/lib/src/utils/uia_request.dart index 8f66b380..569759bd 100644 --- a/lib/src/utils/uia_request.dart +++ b/lib/src/utils/uia_request.dart @@ -88,6 +88,12 @@ class UiaRequest { Future completeStage(AuthenticationData auth) => _run(auth); + /// Cancel this uia request for example if the app can not handle this stage. + void cancel([Exception err]) { + error = err ?? Exception('Request has been canceled'); + state = UiaRequestState.fail; + } + Set getNextStages( List flows, List completed) { final nextStages = {};