I’m building an app in React Native, in which I am now implementing a service where users can authenticate themselves to sync data, and share this with a list of friends they can manage.
When adding or removing a friend, my app needs to basically invalidate and reload its custom user data. The reason for this is, that we are modifying the access of a user to other custom data in the backend, and that the frontend needs to become aware of this change.
Realm’s refreshCustomData()
function does detect the new friend in our user’s object, but we cannot read it’s data yet since the updated permissions aren’t loaded into our front-end yet. I need some way to invalidate, refresh, re-authenticate or just reload the entire user into my realm context, not just the custom data. This does not seem to be documented.
How I achieve this?