realm-dotnet
realm-dotnet copied to clipboard
Add LogOutAsync method without user deletion
Currently, the user.LogOutAsync
method also removes the user data. We should modify the method to have an optional boolean LogOutAsync(bool deleteUser = true)
so that developers can decide what they want to do exactly, with a default value of true to keep the same behaviour we have now
It is not possible to SignIn with sync again after LogOut in same app session. Always got exeption:
Realms.Exceptions.RealmMismatchedConfigException: Realm at path '<path to realm db>' already opened with different sync user.
Sounds like something is keeping the Realm file open with the logged out user. While we should probably look into automatically closing all files owned by the user upon logout, you could also work this around in your app by making sure to dispose of all Realm instances currently opened by the user you want to log out.