Abort the Cross-Device Session

To cancel the handling of the cross-device session (for example, if the end user dismissed the authentication prompt), call the abortCrossDeviceSession method for Android, iOS or Flutter.

miraclTrust.abortCrossDeviceSession(crossDeviceSession) { result ->
    when (result) {
        is MIRACLSuccess -> {
            // The cross-device session is aborted.
        }

        is MIRACLError -> {
            // The cross-device session is not aborted.
        }
    }
}
val result = miraclTrust.abortCrossDeviceSession(crossDeviceSession)

when (result) {
    is MIRACLSuccess -> {
        // The cross-device session is aborted.
    }

    is MIRACLError -> {
        // The cross-device session is not aborted.
    }
}
miraclTrust.abortCrossDeviceSession(
    crossDeviceSession,
    result -> {
        if (result instanceof MIRACLSuccess) {
            // The cross-device session is aborted.
        } else {
            // The cross-device session is not aborted.
        }
    }
);
MIRACLTrust
    .getInstance()
    .abortCrossDeviceSession(
        crossDeviceSession
    ) { isAborted, error in
        // Handle session aborting result here.
    }
[[MIRACLTrust getInstance]
    abortCrossDeviceSession:crossDeviceSession
    completionHandler:^(BOOL isAborted, NSError * error) {
        // Handle session aborting result here.
    }];

Promise:

try {
  await mcl.abortCrossDeviceSession(crossDeviceSession);
} catch (err) {
  // Handle any potential errors
}

Callback:

mcl.abortCrossDeviceSession(crossDeviceSession, function (err) {
  if (err) {
    // Handle any potential errors
  }
});
try {
  await miraclTrust.abortCrossDeviceSession(crossDeviceSession);
  // The cross-device session is aborted.
} on CrossDeviceSession catch(e) {
  // Handle the exception here.
}