You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adjust SyncUser's internal API to no longer permit invalid states
SyncUser previously allowed setting the state to LoggedIn without setting its
tokens, and conversely allowed setting tokens while not logged in. This was
error-prone and happened to result in a lock-order inversion due to that both
the state and the tokens had to be checked in places where we only wanted to
care about one of them.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+6-5Lines changed: 6 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,14 @@
11
11
- Removing one of the SyncUsers would delete all local Realm files for all SyncUsers for that user.
12
12
- Deleting the server-side user via one of the SyncUsers left the other SyncUsers in an invalid state.
13
13
- A SyncUser which was originally created via anonymous login and then linked to an identity would still be treated as an anonymous users and removed entirely on logout.
14
-
(since v10.0.0)
15
-
* Reading existing logged-in users on app startup from the sync metadata Realm performed three no-op writes per user on the metadata Realm.
14
+
([PR #6837](https://github.com/realm/realm-core/pull/6837), since v10.0.0)
15
+
* Reading existing logged-in users on app startup from the sync metadata Realm performed three no-op writes per user on the metadata Realm ([PR #6837](https://github.com/realm/realm-core/pull/6837), since v10.0.0).
16
+
* If a user was logged out while an access token refresh was in progress, the refresh completing would mark the user as logged in again and the user would be in an inconsistent state ([PR #6837](https://github.com/realm/realm-core/pull/6837), since v10.0.0).
16
17
17
18
### Breaking changes
18
-
* SyncUser::provider_type() and realm_user_get_auth_provider() have been removed. Users don't have provider types; identities do.
19
-
* SyncUser no longer has a `local_identity()`. `identity()` has been guaranteed to be unique per App ever since v10.
20
-
* SyncUser no longer overrides operator==. Pointer equality should be used to compare sync users.
19
+
* SyncUser::provider_type() and realm_user_get_auth_provider() have been removed. Users don't have provider types; identities do.`SyncUser::is_anonymous()` is a more correct version of checking if the provider type is anonymous ([PR #6837](https://github.com/realm/realm-core/pull/6837)).
20
+
* SyncUser no longer has a `local_identity()`. `identity()` has been guaranteed to be unique per App ever since v10 ([PR #6837](https://github.com/realm/realm-core/pull/6837)).
21
+
* SyncUser no longer overrides operator==. Pointer equality should be used to compare sync users ([PR #6837](https://github.com/realm/realm-core/pull/6837)).
21
22
22
23
### Compatibility
23
24
* Fileformat: Generates files with format v23. Reads and automatically upgrade from fileformat v5.
0 commit comments