Releases: supabase-community/supabase-kt
3.2.4
Changes
Core
Auth & Compose Auth
- Add support for linkIdentity with OIDC by @jan-tennert in #1051
You can now link a Google / Apple account to an existing Supabase account vialinkIdentityWithIdToken
:To accomplish this with Compose Auth, set thesupabase.auth.linkIdentityWithIdToken(provider = Google, idToken = "idToken received from native auth") { // optional stuff }
onIdToken
parameter in therememberSignInWith(...)
method:This also means, you can upgrade anonymous users via native auth and/or handle the id token received from native auth yourself (e.g. via your viewmodel)//default parameter is ComposeAuth.SIGN_IN_CALLBACK val state = composeAuth.rememberSignInWithGoogle(onIdToken = ComposeAuth.LINK_IDENTITY_CALLBACK)
Samples
3.2.3
Changes
Core
- Update Kotlin to version
2.2.20
(due tokotlinx.browser
changes, using this or a higher version might be required) - Remove atomicfu, migrate Atomic lists/maps, coroutine improvements by @jan-tennert in #1029
Removed atomicfu dependency completely, improvements to atomic references / lists - Fix min loglevel by @sproctor in #951
- Re-add serializers into the bom dependency by @jan-tennert in supabase-community/supabase-kt-plugins@5e34081
Postgrest
- make filter values comply with postrest rules by @sproctor in #1036
You can now use reserved characters in requests - Add overloads for Postgrest insert, upsert and update requests by @manriif in #1034
You can now provide an already-serializedJsonObject
/JsonElement
to theinsert
/upsert
/update
methods
Auth
- Unify Wasm JS and JS implementations by @jan-tennert in #1043
Realtime
- Split callbacks in the CallbackManager by @jan-tennert in #1042
This might increase performance drastically for applications using a lot of (different) callbacks
New Contributors
3.2.2
Changes
Core
- Update to Ktor to version
3.2.2
- Fix Sketch integration not correctly publishing
There is now a Sketch integration for those using Sketch!
Postgrest
Auth
- Fix IMPLICIT OAuth flow on Desktop targets by @jan-tennert in #1005
3.2.1
Info
The plugins have been moved to their own repository by @jan-tennert in #955
- I added a Sketch integration, however there were some problems publishing this plugin, I'll fix it soon
- In the future the versioning for the plugins will be separate from the main modules, I'm still deciding whether I just detach the plugins from the publishing process or find another solution. Nothing should have changed for now
If you encounter classpath errors, manually add the main modules you're using (e.g., Auth) as dependencies, rather than relying solely on plugin dependencies (e.g., Compose Auth). This will be resolved in the next version.
Changes
Core
- Update KotlinX Datetime to version
0.7.1
by @jan-tennert in #995 - Update Ktor to version
3.2.1
Functions
Realtime
- Add presence enabled flag by @jan-tennert in #996
New Contributors
3.2.0
Changes
Note: KotlinX Datetime Version 0.7.0
is not compatible for now! An update to KotlinX Serialization is required.
All modules
- Update to Kotlin
2.2.0
- Update to Ktor
3.2.0
- Don't swallow
CancellationException
by @sproctor in #895 - Only catch serialization exceptions in
bodyOrNull
by @jan-tennert in #904 - Fix simple warnings by @sproctor in #915
- Use Dispatchers.IO by default on multi-threaded platforms by @sproctor in #905
- Configurable default dispatcher
SupabaseClientBuilder#coroutineDispatcher
, defaulting toDispatchers.IO
on supported targets. - Deprecated
AuthConfig#coroutineDispatcher
, replaced by the new client wide dispatcher.
- Configurable default dispatcher
Core
- Add new standard headers by @jan-tennert in #927
Auth
-
Add new event system, add support for error code in OTP links by @jan-tennert in #912
supabase.auth.events.collect { when(it) { is AuthEvent.OtpError -> { println(it.errorCode) } is AuthEvent.RefreshFailure -> TODO() } }
New event system which exists next to the
sessionStatus
, but works independently. Currently there are two events:AuthEvent.OtpError(...)
- will be emitted if an error code was found in a OTP link (deeplink on Android/iOS, URL on JS and Desktop)AuthEvent.RefreshFailure(cause)
- will be emitted if a session refresh failed (regardless if the session is still valid)
This PR also changes the
SessionStatus.RefreshFailure(cause)
:- The
cause
parameter/property is deprecated (use the event for the cause) - This status will only get set, if the session expired.
--> If a refresh failed, an event will always be emitted, but the session status will only get updated if the session also expired. Planning to rename the status in the future to something like
SessionStatus.NeedsRefresh
Additional changes:
- Error related parameters will now be removed from the history when used
-
(JS, WASM JS) Add an option to disable automatic url checking by @jan-tennert in #96
install(Auth) { disableUrlChecking = true //Default: false }
-
Add support for providing a custom url launcher by @jan-tennert in #933
You can now provide a customUrlLauncher
for opening URLs in the OAuth flow:install(Auth) { urlLauncher = UrlLauncher { supabase, url -> println("Opening URL: $url") } }
-
Deprecate NativeSignInResult.NetworkError as it isn't used by @jan-tennert in #952
-
Deprecate minimalSettings in favor of minimalConfig by @jan-tennert in #916
-
Fix null result when sign up with Email provider by @hieuwu in #922
- Fix OAuth server listener resuming coroutine twice by @jan-tennert in #893
A Desktop app using OAuth should no longer produce an exception when exiting the app after usingsignInWith(OAuthProvider)
- Add missing error codes by @jan-tennert in #909:
EmailAddressInvalid
,Web3ProviderDisabled
,Web3UnsupportedChain
- (JS/Wasm JS) Fix exception on non-session hash parameters and only consume used parameters by @jan-tennert in #911
Previously, all URL parameters / hash parameter were removed after successfully authenticating, this is no longer the case. - Fix session expiration check by @jan-tennert in #913
The session will now also be refreshed when the current date time is under a certain threshold (20% before the actual expiration), instead of only after session expiration
Postgrest
- Fix serialization exception occurring when
PostgrestRestException#details
is not a String by @jan-tennert in #956
New Contributors
3.2.0-rc-1
Changes
Changes marked with (new) weren't available in previous pre-releases
All modules
- Don't swallow
CancellationException
by @sproctor in #895 - Only catch serialization exceptions in
bodyOrNull
by @jan-tennert in #904 - Fix simple warnings by @sproctor in #915
- Use Dispatchers.IO by default on multi-threaded platforms by @sproctor in #905
- Configurable default dispatcher
SupabaseClientBuilder#coroutineDispatcher
, defaulting toDispatchers.IO
on supported targets. - Deprecated
AuthConfig#coroutineDispatcher
, replaced by the new client wide dispatcher.
- Configurable default dispatcher
Core
- (new) Add new standard headers by @jan-tennert in #927
Auth
-
(new) Add new event system, add support for error code in OTP links by @jan-tennert in #912
supabase.auth.events.collect { when(it) { is AuthEvent.OtpError -> { println(it.errorCode) } is AuthEvent.RefreshFailure -> TODO() } }
New event system which exists next to the
sessionStatus
, but works independently. Currently there are two events:AuthEvent.OtpError(...)
- will be emitted if an error code was found in a OTP link (deeplink on Android/iOS, URL on JS and Desktop)AuthEvent.RefreshFailure(cause)
- will be emitted if a session refresh failed (regardless if the session is still valid)
This PR also changes the
SessionStatus.RefreshFailure(cause)
:- The
cause
parameter/property is deprecated (use the event for the cause) - This status will only get set, if the session expired.
--> If a refresh failed, an event will always be emitted, but the session status will only get updated if the session also expired. Planning to rename the status in the future to something like
SessionStatus.NeedsRefresh
Additional changes:
- Error related parameters will now be removed from the history when used
-
(new) Deprecate NativeSignInResult.NetworkError as it isn't used by @jan-tennert in #952
-
(new) (JS, WASM JS) Add an option to disable automatic url checking by @jan-tennert in #964
install(Auth) { disableUrlChecking = true //Default: false }
-
Deprecate minimalSettings in favor of minimalConfig by @jan-tennert in #916
-
Fix null result when sign up with Email provider by @hieuwu in #922
-
Add support for providing a custom url launcher by @jan-tennert in #933
You can now provide a customUrlLauncher
for opening URLs in the OAuth flow:install(Auth) { urlLauncher = UrlLauncher { supabase, url -> println("Opening URL: $url") } }
- Fix OAuth server listener resuming coroutine twice by @jan-tennert in #893
A Desktop app using OAuth should no longer produce an exception when exiting the app after usingsignInWith(OAuthProvider)
- Add missing error codes by @jan-tennert in #909:
EmailAddressInvalid
,Web3ProviderDisabled
,Web3UnsupportedChain
- (JS/Wasm JS) Fix exception on non-session hash parameters and only consume used parameters by @jan-tennert in #911
Previously, all URL parameters / hash parameter were removed after successfully authenticating, this is no longer the case. - Fix session expiration check by @jan-tennert in #913
The session will now also be refreshed when the current date time is under a certain threshold (20% before the actual expiration), instead of only after session expiration
Postgrest
- (new) Fix serialization exception occurring when
PostgrestRestException#details
is not a String by @jan-tennert in #956
New Contributors
3.2.0-beta-2
Changes
Auth
- Deprecate minimalSettings in favor of minimalConfig by @jan-tennert in #916
- Fix null result when sign up with Email provider by @hieuwu in #922
- Add support for providing a custom url launcher by @jan-tennert in #933
You can now provide a customUrlLauncher
for opening URLs in the OAuth flow:install(Auth) { urlLauncher = UrlLauncher { supabase, url -> println("Opening URL: $url") } }
3.2.0-beta-1
Changes
Previously wanted to release the version as a whole, but that will take at least to next week. Several features are missing, but there were a few bug fixes!
All modules
- Don't swallow
CancellationException
by @sproctor in #895 - Only catch serialization exceptions in
bodyOrNull
by @jan-tennert in #904 - Fix simple warnings by @sproctor in #915
- Use Dispatchers.IO by default on multi-threaded platforms by @sproctor in #905
- Configurable default dispatcher
SupabaseClientBuilder#coroutineDispatcher
, defaulting toDispatchers.IO
on supported targets. - Deprecated
AuthConfig#coroutineDispatcher
, replaced by the new client wide dispatcher.
- Configurable default dispatcher
Auth
- Fix OAuth server listener resuming coroutine twice by @jan-tennert in #893
A Desktop app using OAuth should no longer produce an exception when exiting the app after usingsignInWith(OAuthProvider)
- Add missing error codes by @jan-tennert in #909:
EmailAddressInvalid
,Web3ProviderDisabled
,Web3UnsupportedChain
- (JS/Wasm JS) Fix exception on non-session hash parameters and only consume used parameters by @jan-tennert in #911
Previously, all URL parameters / hash parameter were removed after successfully authenticating, this is no longer the case. - Fix session expiration check by @jan-tennert in #913
The session will now also be refreshed when the current date time is under a certain threshold (20% before the actual expiration), instead of only after session expiration
New Contributors
3.1.4
Changes
All modules
- Remove
sealed
modifier from interfaces where they are not needed (and prevent mocking in KMP) by @jan-tennert in #883
Core
- Fix custom serializer modules not being used in the
KotlinXSerializer
by @jan-tennert in #881
3.1.3
Changes
Auth
- Fix JS/Wasm hash/code check and removal by @Sparky983 and @jan-tennert in #875
Hashes & PKCE codes should now be correctly checked for on WASM, and removed from the browser history after usage on WASM and JS.
New Contributors
- @Sparky983 made their first contribution in #875