Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add LogOutAsync method without user deletion #3516

Open
papafe opened this issue Feb 8, 2024 · 2 comments
Open

Add LogOutAsync method without user deletion #3516

papafe opened this issue Feb 8, 2024 · 2 comments

Comments

@papafe
Copy link
Contributor

papafe commented Feb 8, 2024

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

@aliegeni
Copy link

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.

@nirinchev
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants