From 5cb6c48200fb2603afa4855d7aad1aea98901024 Mon Sep 17 00:00:00 2001 From: Clemente Date: Mon, 20 May 2024 15:45:12 +0200 Subject: [PATCH 1/9] Remove deprecated user methods --- .../kotlin/io/realm/kotlin/mongodb/App.kt | 5 ++-- .../kotlin/io/realm/kotlin/mongodb/User.kt | 15 ------------ .../realm/kotlin/mongodb/internal/AppImpl.kt | 15 ++++-------- .../realm/kotlin/mongodb/internal/UserImpl.kt | 11 +++------ .../kotlin/test/mongodb/common/AppTests.kt | 24 ++++++++++--------- .../test/mongodb/common/CredentialsTests.kt | 14 +++++------ .../kotlin/test/mongodb/common/UserTests.kt | 4 ++-- 7 files changed, 32 insertions(+), 56 deletions(-) diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt index d129f3b526..8f2116eaa8 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt @@ -106,10 +106,9 @@ public interface App { * Returns all known users that are either [User.State.LOGGED_IN] or [User.State.LOGGED_OUT]. * Only users that at some point logged into this device will be returned. * - * @return a map of user identifiers and users known locally. User identifiers will match what - * is returned by [User.identity]. + * @return a list of users known locally. */ - public fun allUsers(): Map + public fun allUsers(): List /** * Log in as a user with the given credentials associated with an authentication provider. diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/User.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/User.kt index 2f68bb6528..17d696a345 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/User.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/User.kt @@ -52,14 +52,6 @@ public interface User { */ public val state: State - /** - * The server id of the user. - * - * This property has been deprecated in favor of [id] and will be replaced in a future release. - */ - @Deprecated("Use `User.id` instead", replaceWith = ReplaceWith("id")) - public val identity: String - /** * The server id of the user. */ @@ -79,13 +71,6 @@ public interface User { */ public val identities: List - /** - * Returns the provider type used to log the user in. - * If a user logs out, the authentication provider last used to log the user in will still be returned. - */ - @Deprecated("Users might have multiple providers. This will return the provider of the first identity of the user", ReplaceWith("identities")) - public val provider: AuthenticationProvider - /** * Returns the current access token for the user. * If a user logs out, an empty access token is returned. diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppImpl.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppImpl.kt index 2ea4681ff6..34c6cc95fb 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppImpl.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/AppImpl.kt @@ -134,16 +134,11 @@ public class AppImpl( ?.let { UserImpl(it, this) } override val sync: Sync by lazy { SyncImpl(nativePointer) } - override fun allUsers(): Map { - val nativeUsers: List = - RealmInterop.realm_app_get_all_users(nativePointer) - val map = mutableMapOf() - nativeUsers.map { ptr: RealmUserPointer -> - val user = UserImpl(ptr, this) - map[user.identity] = user - } - return map - } + override fun allUsers(): List = + RealmInterop.realm_app_get_all_users(nativePointer) + .map { ptr: RealmUserPointer -> + UserImpl(ptr, this) + } override suspend fun login(credentials: Credentials): User { // suspendCoroutine doesn't allow freezing callback capturing continuation diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt index 14be010962..78a1c11c82 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt @@ -41,16 +41,11 @@ public class UserImpl( override val state: User.State get() = fromCoreState(RealmInterop.realm_user_get_state(nativePointer)) - // TODO Can maybe fail, but we could also cache the return value? - override val identity: String - get() = id override val id: String get() = RealmInterop.realm_user_get_identity(nativePointer) override val loggedIn: Boolean get() = RealmInterop.realm_user_is_logged_in(nativePointer) - @Deprecated("Property not stable, users might have multiple providers.", ReplaceWith("User.identities")) - override val provider: AuthenticationProvider - get() = identities.first().provider + override val accessToken: String get() = RealmInterop.realm_user_get_access_token(nativePointer) override val refreshToken: String @@ -187,13 +182,13 @@ public class UserImpl( if (other == null || this::class != other::class) return false other as UserImpl + if (id != (other.id)) return false - if (identity != (other.identity)) return false return app.configuration == other.app.configuration } override fun hashCode(): Int { - var result = identity.hashCode() + var result = id.hashCode() result = 31 * result + app.configuration.appId.hashCode() return result } diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt index de9d26aae5..863bff904b 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt @@ -48,6 +48,7 @@ import io.realm.kotlin.test.util.TestHelper import io.realm.kotlin.test.util.TestHelper.randomEmail import io.realm.kotlin.test.util.receiveOrFail import kotlinx.coroutines.async +import kotlinx.coroutines.delay import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import kotlin.test.AfterTest @@ -121,7 +122,7 @@ class AppTests { @Suppress("LoopWithTooManyJumpStatements") @Test fun login_invalidCredentialsThrows() = runBlocking { - for (provider in AuthenticationProvider.values()) { + for (provider in AuthenticationProvider.entries) { when (provider) { AuthenticationProvider.ANONYMOUS -> { // No user input, so invalid credentials are not possible. @@ -164,50 +165,51 @@ class AppTests { @Test fun allUsers() = runBlocking { assertEquals(0, app.allUsers().size) + val user1 = app.login(Credentials.anonymous()) var allUsers = app.allUsers() assertEquals(1, allUsers.size) - assertTrue(allUsers.containsKey(user1.identity)) - assertEquals(user1, allUsers[user1.identity]) + assertTrue(allUsers.contains(user1)) // Only 1 anonymous user exists, so logging in again just returns the old one val user2 = app.login(Credentials.anonymous()) allUsers = app.allUsers() assertEquals(1, allUsers.size) - assertTrue(allUsers.containsKey(user2.identity)) + assertTrue(allUsers.contains(user2)) val user3: User = app.asTestApp.createUserAndLogIn(TestHelper.randomEmail(), "123456") allUsers = app.allUsers() assertEquals(2, allUsers.size) - assertTrue(allUsers.containsKey(user3.identity)) + assertTrue(allUsers.contains(user3)) // Logging out users that registered with email/password will just put them in LOGGED_OUT state user3.logOut() allUsers = app.allUsers() assertEquals(2, allUsers.size) - assertTrue(allUsers.containsKey(user3.identity)) - assertEquals(User.State.LOGGED_OUT, allUsers[user3.identity]!!.state) + assertTrue(allUsers.contains(user3)) // Logging out anonymous users will remove them completely user1.logOut() allUsers = app.allUsers() assertEquals(1, allUsers.size) - assertFalse(allUsers.containsKey(user1.identity)) + assertTrue(allUsers.contains(user3)) + assertFalse(allUsers.contains(user2)) + assertFalse(allUsers.contains(user1)) } @Test fun allUsers_retrieveRemovedUser() = runBlocking { val user1: User = app.login(Credentials.anonymous()) - val allUsers: Map = app.allUsers() + val allUsers = app.allUsers() assertEquals(1, allUsers.size) user1.logOut() assertEquals(1, allUsers.size) - val userCopy: User = allUsers[user1.identity] ?: fail("Could not find user") + val userCopy: User = allUsers.first() assertEquals(user1, userCopy) assertEquals(User.State.REMOVED, userCopy.state) assertTrue(app.allUsers().isEmpty()) } -// + // @Test // fun switchUser() { // val user1: User = app.login(Credentials.anonymous()) diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/CredentialsTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/CredentialsTests.kt index 1737450c1d..ee84b4ddca 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/CredentialsTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/CredentialsTests.kt @@ -72,7 +72,7 @@ class CredentialsTests { @Test fun allCredentials() { - AuthenticationProvider.values().flatMap { + AuthenticationProvider.entries.flatMap { when (it) { AuthenticationProvider.ANONYMOUS -> listOf(it to anonymous()) AuthenticationProvider.EMAIL_PASSWORD -> listOf(it to emailPassword()) @@ -103,7 +103,7 @@ class CredentialsTests { @Test fun allCredentials_emptyInputThrows() { - for (value in AuthenticationProvider.values()) { + for (value in AuthenticationProvider.entries) { assertFailsWith("$value failed") { // No arguments should be allow when (value) { AuthenticationProvider.ANONYMOUS -> throw IllegalArgumentException("Do nothing, no arguments") @@ -267,29 +267,29 @@ class CredentialsTests { assertNotNull(firstUser) val reusedUser = app.login(Credentials.anonymous()) assertNotNull(reusedUser) - assertEquals(firstUser.identity, reusedUser.identity) + assertEquals(firstUser, reusedUser) val newAnonymousUser1 = app.login(Credentials.anonymous(false)) assertNotNull(newAnonymousUser1) - assertNotEquals(firstUser.identity, newAnonymousUser1.identity) + assertNotEquals(firstUser, newAnonymousUser1) val newAnonymousUser2 = app.login(Credentials.anonymous(false)) assertNotNull(newAnonymousUser2) - assertNotEquals(newAnonymousUser1.identity, newAnonymousUser2.identity) + assertNotEquals(newAnonymousUser1, newAnonymousUser2) } } @Test fun loginUsingCredentials() { runBlocking { - AuthenticationProvider.values().forEach { provider -> + AuthenticationProvider.entries.forEach { provider -> when (provider) { AuthenticationProvider.ANONYMOUS -> { val reusableUser = app.login(Credentials.anonymous()) assertNotNull(reusableUser) val nonReusableUser = app.login(Credentials.anonymous(false)) assertNotNull(nonReusableUser) - assertNotEquals(reusableUser.identity, nonReusableUser.identity) + assertNotEquals(reusableUser, nonReusableUser) } AuthenticationProvider.API_KEY -> { // Log in, create an API key, log out, log in with the key, compare users diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt index 34b69a847d..9f9b3d4232 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/UserTests.kt @@ -125,10 +125,10 @@ class UserTests { fun getProviderType() = runBlocking { val email = randomEmail() val emailUser = createUserAndLogin(email, "123456") - assertEquals(AuthenticationProvider.EMAIL_PASSWORD, emailUser.provider) + assertEquals(AuthenticationProvider.EMAIL_PASSWORD, emailUser.identities.first().provider) emailUser.logOut() // AuthenticationProvider is not removed once user is logged out - assertEquals(AuthenticationProvider.EMAIL_PASSWORD, emailUser.provider) + assertEquals(AuthenticationProvider.EMAIL_PASSWORD, emailUser.identities.first().provider) } @Test From 4ed33e9fab8cc0fd10a31fb33aa5cd243c3e8729 Mon Sep 17 00:00:00 2001 From: Clemente Date: Mon, 20 May 2024 15:51:00 +0200 Subject: [PATCH 2/9] Update changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dc41a998ba..43c1d82d09 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,8 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi ### Breaking changes * Removed property `RealmLog.level`. Log levels can be set with `RealmLog.setLevel`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038)) * Removed `LogConfiguration`. Log levels and custom loggers can be set with `RealmLog`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038)) +* Removed deprecated methods `User.identity` and `User.provider`, user identities can be accessed with `User.identities`. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) +* `App.allUsers` now returns a list of users known locally. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) ### Enhancements * Support for RealmLists and RealmDictionaries in `RealmAny`. (Issue [#1434](https://github.com/realm/realm-kotlin/issues/1434)) From efd7510fca17d16f932a42eed15d7ed45954305a Mon Sep 17 00:00:00 2001 From: Clemente Date: Mon, 20 May 2024 16:11:16 +0200 Subject: [PATCH 3/9] Linting --- .../kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt | 1 - .../kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt | 2 -- 2 files changed, 3 deletions(-) diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt index 78a1c11c82..17ba80da91 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt @@ -20,7 +20,6 @@ import io.realm.kotlin.internal.interop.RealmInterop import io.realm.kotlin.internal.interop.RealmUserPointer import io.realm.kotlin.internal.interop.sync.CoreUserState import io.realm.kotlin.internal.util.use -import io.realm.kotlin.mongodb.AuthenticationProvider import io.realm.kotlin.mongodb.Credentials import io.realm.kotlin.mongodb.Functions import io.realm.kotlin.mongodb.User diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt index 863bff904b..849e2e9159 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt @@ -48,7 +48,6 @@ import io.realm.kotlin.test.util.TestHelper import io.realm.kotlin.test.util.TestHelper.randomEmail import io.realm.kotlin.test.util.receiveOrFail import kotlinx.coroutines.async -import kotlinx.coroutines.delay import kotlinx.coroutines.sync.Mutex import kotlinx.coroutines.sync.withLock import kotlin.test.AfterTest @@ -62,7 +61,6 @@ import kotlin.test.assertNotEquals import kotlin.test.assertNull import kotlin.test.assertSame import kotlin.test.assertTrue -import kotlin.test.fail class AppTests { From 02d89ec3aae72f895c23d5748a06962552271179 Mon Sep 17 00:00:00 2001 From: Clemente Date: Mon, 20 May 2024 19:08:11 +0200 Subject: [PATCH 4/9] Update expected message --- .../io/realm/kotlin/test/mongodb/common/FunctionsTests.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt index cfd87265a1..da47594fcf 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/FunctionsTests.kt @@ -954,7 +954,7 @@ class FunctionsTests { @Test fun unknownFunction() { - assertFailsWithMessage("function not found: 'unknown'") { + assertFailsWithMessage("function not found") { runBlocking { functions.call("unknown", 32) } From 3b892338029a301cfe61918cf5bdb02f9bf9a765 Mon Sep 17 00:00:00 2001 From: Clemente Date: Mon, 20 May 2024 20:36:32 +0200 Subject: [PATCH 5/9] bump aws farm test timeout --- .github/actions/run-android-device-farm-test/action.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/actions/run-android-device-farm-test/action.yml b/.github/actions/run-android-device-farm-test/action.yml index 2d15f48b8f..524aac798c 100644 --- a/.github/actions/run-android-device-farm-test/action.yml +++ b/.github/actions/run-android-device-farm-test/action.yml @@ -41,6 +41,7 @@ runs: test_spec_file: test_spec-${{ inputs.app-id }}.yaml test_spec_type: APPIUM_PYTHON_TEST_SPEC remote_src: true + timeout: 3600 test_spec: | version: 0.1 phases: From 04e98194769079b6e175fdb3d57dbcfdfd23fc73 Mon Sep 17 00:00:00 2001 From: clementetb Date: Tue, 21 May 2024 13:24:47 +0200 Subject: [PATCH 6/9] Update packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Claus Rørbech --- .../src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt index 8f2116eaa8..65581130b1 100644 --- a/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt +++ b/packages/library-sync/src/commonMain/kotlin/io/realm/kotlin/mongodb/App.kt @@ -106,7 +106,7 @@ public interface App { * Returns all known users that are either [User.State.LOGGED_IN] or [User.State.LOGGED_OUT]. * Only users that at some point logged into this device will be returned. * - * @return a list of users known locally. + * @return a list of locally known users. */ public fun allUsers(): List From 07dafae0f303ec00ff7e3b578385cf8e8ee4d807 Mon Sep 17 00:00:00 2001 From: clementetb Date: Tue, 21 May 2024 13:24:53 +0200 Subject: [PATCH 7/9] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Claus Rørbech --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43c1d82d09..657b1dc6b6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi * Removed property `RealmLog.level`. Log levels can be set with `RealmLog.setLevel`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038)) * Removed `LogConfiguration`. Log levels and custom loggers can be set with `RealmLog`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038)) * Removed deprecated methods `User.identity` and `User.provider`, user identities can be accessed with `User.identities`. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) -* `App.allUsers` now returns a list of users known locally. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) +* `App.allUsers` does no longer return a map, but only a list of users known locally. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) ### Enhancements * Support for RealmLists and RealmDictionaries in `RealmAny`. (Issue [#1434](https://github.com/realm/realm-kotlin/issues/1434)) From 35dc12324132df9f259311c47286e3caf376e0ad Mon Sep 17 00:00:00 2001 From: clementetb Date: Tue, 21 May 2024 13:25:00 +0200 Subject: [PATCH 8/9] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Claus Rørbech --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 657b1dc6b6..9625e11e6e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ This release will bump the Realm file format from version 23 to 24. Opening a fi ### Breaking changes * Removed property `RealmLog.level`. Log levels can be set with `RealmLog.setLevel`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038)) * Removed `LogConfiguration`. Log levels and custom loggers can be set with `RealmLog`. (Issue [#1691](https://github.com/realm/realm-kotlin/issues/1691) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1038)) -* Removed deprecated methods `User.identity` and `User.provider`, user identities can be accessed with `User.identities`. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) +* Removed deprecated methods `User.identity` and `User.provider`, user identities can be accessed with the already existing `User.identities`. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) * `App.allUsers` does no longer return a map, but only a list of users known locally. (Issue [#1751](https://github.com/realm/realm-kotlin/issues/1751) [JIRA](https://jira.mongodb.org/browse/RKOTLIN-1083)) ### Enhancements From 0abcb8f25ee2e3c00001ecd06f7408d6711eece5 Mon Sep 17 00:00:00 2001 From: Clemente Date: Tue, 21 May 2024 20:23:14 +0200 Subject: [PATCH 9/9] PR change requests --- .../kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt index 849e2e9159..55f9b94eb5 100644 --- a/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt +++ b/packages/test-sync/src/commonTest/kotlin/io/realm/kotlin/test/mongodb/common/AppTests.kt @@ -185,6 +185,7 @@ class AppTests { allUsers = app.allUsers() assertEquals(2, allUsers.size) assertTrue(allUsers.contains(user3)) + assertEquals(User.State.LOGGED_OUT, user3.state) // Logging out anonymous users will remove them completely user1.logOut()