hi,
we are having a particularly difficult time handling realm resets with the flutter SDK. Honestly, the documentation is really quite poor. It offers no examples of real world recovery strategies, leaving the engineer guessing.
We have tried implementing the client reset handler, but this doesn’t appear to actually do anything of any real use. We see a debug message get logged saying the permission set has changed, but it does not seem capable of recovering from this.
It is a similar affair if we make a change to the schema server side. Closing the app and re-opening it works, but we can’t seem to handle this gracefully.
Are there any working examples of a graceful app restart where such a restart is required due to server side changes, whether schema or permission?
The other major frustration is the rule set behaviour; we have a scenario where a rule set is based on 2 different values within custom user data.
Lets call these values user_id and permission_id.
We pass the user_id to the custom auth provider at auth, and this is attached as identity.id and is accessible. But because the auth process will only permit 1 string based value that must not change, we cannot pass the second value (permission_id) here.
So instead we trigger a post auth function, either that creates the custom data or updates it depending on whether this is first login or not, but this results in a permission change… you guessed it… crashing the app.
Surely, there is a better way?
I found several similar issues in these forums with responses from the developers st`ating they are planning improvements to this (a year ago) but I cannot see any update.
Can anyone shed any light here before I put a fist through my mac book?