diff --git a/CHANGELOG.md b/CHANGELOG.md index cc76998202..702996027e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ GET requests. (Issue [#1517](https://github.com/realm/realm-kotlin/pull/1517)) * Minimum Android SDK: 16. ### Internal -* None. +* 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 c2b2a07d8f..cd48ae8854 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 @@ -1114,10 +1114,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 46facf20d2..54feccf235 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 @@ -2287,10 +2287,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 c258e2681b..f8604b9fd3 160000 --- a/packages/external/core +++ b/packages/external/core @@ -1 +1 @@ -Subproject commit c258e2681bca5fb33bbd23c112493817b43bfa86 +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