From 3db129be4c1b708bd324295b07c5e6d3d87a9586 Mon Sep 17 00:00:00 2001 From: Clemente Date: Thu, 12 Oct 2023 16:28:18 +0200 Subject: [PATCH] Bump core to version 13.23.0 --- CHANGELOG.md | 2 +- .../kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt | 1 - .../kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt | 4 ---- .../kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt | 4 ---- packages/external/core | 2 +- .../src/commonMain/kotlin/io/realm/kotlin/mongodb/User.kt | 1 + .../kotlin/io/realm/kotlin/mongodb/internal/UserImpl.kt | 2 +- 7 files changed, 4 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b91fe6a523..3a5a569e62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,7 +23,7 @@ * Minimum Android SDK: 16. ### Internal -* Updated to Realm Core 13.20.0, commit a3717e492ec606e42995169cf706a82fc1cd0698. +* Updated to Realm Core 13.23.0, commit f8604b9fd3d2982008a1d3f5ff35e52ee9098d5b. ## 1.11.1 (2023-09-07) diff --git a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 1cd6c153c9..293190fe4d 100644 --- a/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/commonMain/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -534,7 +534,6 @@ expect object RealmInterop { // User fun realm_user_get_all_identities(user: RealmUserPointer): List fun realm_user_get_identity(user: RealmUserPointer): String - fun realm_user_get_auth_provider(user: RealmUserPointer): AuthProvider fun realm_user_get_access_token(user: RealmUserPointer): String fun realm_user_get_refresh_token(user: RealmUserPointer): String fun realm_user_get_device_id(user: RealmUserPointer): String diff --git a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index 14674de642..053bc8dc1c 100644 --- a/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/jvm/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -1157,10 +1157,6 @@ actual object RealmInterop { return realmc.realm_user_get_identity(user.cptr()) } - actual fun realm_user_get_auth_provider(user: RealmUserPointer): AuthProvider { - return AuthProvider.of(realmc.realm_user_get_auth_provider(user.cptr())) - } - actual fun realm_user_get_access_token(user: RealmUserPointer): String { return realmc.realm_user_get_access_token(user.cptr()) } diff --git a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt index b33d0cbe22..033553dd05 100644 --- a/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt +++ b/packages/cinterop/src/nativeDarwin/kotlin/io/realm/kotlin/internal/interop/RealmInterop.kt @@ -2302,10 +2302,6 @@ actual object RealmInterop { return realm_wrapper.realm_user_get_identity(user.cptr()).safeKString("identity") } - actual fun realm_user_get_auth_provider(user: RealmUserPointer): AuthProvider { - return AuthProvider.of(realm_wrapper.realm_user_get_auth_provider(user.cptr())) - } - actual fun realm_user_is_logged_in(user: RealmUserPointer): Boolean { return realm_wrapper.realm_user_is_logged_in(user.cptr()) } diff --git a/packages/external/core b/packages/external/core index a3717e492e..f8604b9fd3 160000 --- a/packages/external/core +++ b/packages/external/core @@ -1 +1 @@ -Subproject commit a3717e492ec606e42995169cf706a82fc1cd0698 +Subproject commit f8604b9fd3d2982008a1d3f5ff35e52ee9098d5b 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 fa4d7e3742..1fc0d1cb32 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 @@ -83,6 +83,7 @@ public interface User { * 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("Property not stable, users might have multiple providers.", ReplaceWith("identities")) public val provider: AuthenticationProvider /** 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 c10d3a4971..ec96b5d864 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 @@ -49,7 +49,7 @@ public class UserImpl( override val loggedIn: Boolean get() = RealmInterop.realm_user_is_logged_in(nativePointer) override val provider: AuthenticationProvider - get() = AuthenticationProviderImpl.fromId(RealmInterop.realm_user_get_auth_provider(nativePointer)) + get() = identities.first().provider override val accessToken: String get() = RealmInterop.realm_user_get_access_token(nativePointer) override val refreshToken: String