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 |
---|---|---|---|
Recommended sequence when internet access is restored | 1 | 702 | May 2024 |
Error - Realm file path being too long | 0 | 473 | Jun 2024 |
Migrating synced Realm Schema | 1 | 281 | Sep 2024 |
Using inMemory realm with concurrency | 1 | 291 | Jul 2024 |
Multiple Realms In Single App | 1 | 131 | Aug 2024 |