Realm Swift SDK: Detect Atlas Sync User Revocation?

I have a macOS app built with the Realm Swift SDK. It uses Device Sync. If I manually revoke a user (of the Atlas App) on the MongoDB website, I want my client app to detect and handle that event. How can I do this?


This is an enterprise app. Imagine a employer fires an employee who uses the app. The employer wants to be sure the employee’s access is immediately disabled AND that the local copy of the database on the employee’s Mac is destroyed.

To achieve this, I need a way to know when the currentUser on an open Realm has been revoked.