2.4.0
Changes
Core
- Update Kotlin to 2.0.0-RC2 and Compose to 1.6.10-rc01 by @jan-tennert in #581
- Rethrow
CancellationException
s in network requests by @jan-tennert in #578 - Log the actual error if a network request fails by @jan-tennert in 0c93053
Auth
- Auth changes & fixes by @jan-tennert in #568
- The method
Auth#linkIdentity
will now return the OAuth URL if the config valueExternalAuthConfigDefaults.automaticallyOpenUrl
is set to false.
Otherwise, null. - Fix the
autoRefresh
default value forAuth#importSession
not being set toconfig.alwaysAutoRefresh
- Add
codeVerifier
parameter toMemoryCodeVerifierCache
to be able to set an initial value - Add missing
captchaToken
config option in theOTP
auth provider
- The method
- Change the default session key for the
SettingsSessionManager
to work with multiple instances on the same device and add akey
parameter to the constructor in case you want a custom key by @MohamedRejeb in #572
Realtime
- Add new experimental extension functions to retrieve initial data and listen for updates without using realtime channels by @jan-tennert #579:
//Not a suspending function, subscribing and unsubscribing is handled internally
val myProductFlow: Flow<Product> = supabase.from("products").selectSingleValueAsFlow(Product::id) {
Product::id eq 2
}.collect {
println(it)
}
val productsFlow: Flow<List<Product>> = supabase.from("products").selectAsFlow(Product::id, filter = FilterOperation("id", FilterOperator.GT, 2)).collect {
println(it)
}
This requires both Realtime
and Postgrest
to be installed within the SupabaseClient.
Storage
Functions
- Add new
region
parameter to invoke functions which allows changing the region where the Edge Function will be invoked in. Defaults toFunctions.Config#defaultRegion
(which isFunctionRegion.ANY
) by @jan-tennert in #580