I’m using Realm.NET with FlexibleSync configuration in my Xamarin.Forms application, and I see that neither realmApplication.CurrentUser.LogOutAsync() nor realmApplication.RemoveUser() has any effect when CurrentUser has “anonymous” provider. How do I log them out?
That sounds incorrect - how do you observe it having no effect? Do you still see the user as logged in when the app is launched again?
Yes, after invoking either method, CurrentUser is still set to the anonymous user.
Maybe it’s a bug then? We’re using version 11.5.0 of the nuget library.
Any update on this? In our app, it seems to not be a huge problem – after it fails to log out the anonymous user, when a real (not anonymous) user attempts to log in, it seems to work without issue (and CurrentUser is set to the new person). But I just wonder if this behavior (anonymous CurrentUser doesn’t “go null” after log out) is “as-designed”, or will it come back to bite us in unexpected ways…?
It is unexpected, but I haven’t gotten around to it to try and reproduce and understand what’s the root cause. I’ve opened a github issue to track this.
New & Unread Topics
Topic | Replies | Views | Activity |
---|---|---|---|
BadChangeset Error with React Native | 3 | 658 | May 2024 |
Possible to rebuild full text indexes | 0 | 567 | May 2024 |
RealmSwift wait(for: .upload) not working | 0 | 408 | Jun 2024 |
Atlas app services Data Api insertOne failing validation on _id? | 1 | 187 | Sep 2024 |
How does MongoDB Realm Sync handle updating objects with no changes?” | 1 | 118 | Sep 2024 |