Skip to content

Releases: supabase-community/supabase-kt

3.2.2

20 Jul 16:38
7573d6f
Compare
Choose a tag to compare

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

3.2.1

14 Jul 20:33
a599362
Compare
Choose a tag to compare

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

  • Improve docs to put more context of the parameter when a function is renamed by @hieuwu in #993

Realtime

New Contributors

3.2.0

25 Jun 16:55
6bc991d
Compare
Choose a tag to compare

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 to Dispatchers.IO on supported targets.
    • Deprecated AuthConfig#coroutineDispatcher, replaced by the new client wide dispatcher.

Core

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 custom UrlLauncher 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 using signInWith(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

13 Jun 12:40
4708104
Compare
Choose a tag to compare
3.2.0-rc-1 Pre-release
Pre-release

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 to Dispatchers.IO on supported targets.
    • Deprecated AuthConfig#coroutineDispatcher, replaced by the new client wide dispatcher.

Core

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 custom UrlLauncher 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 using signInWith(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

15 May 19:34
50fba64
Compare
Choose a tag to compare
3.2.0-beta-2 Pre-release
Pre-release

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 custom UrlLauncher for opening URLs in the OAuth flow:
    install(Auth)  {
        urlLauncher = UrlLauncher { supabase, url ->
            println("Opening URL: $url")
        }
    }

3.2.0-beta-1

04 May 18:32
bbc35ed
Compare
Choose a tag to compare
3.2.0-beta-1 Pre-release
Pre-release

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 to Dispatchers.IO on supported targets.
    • Deprecated AuthConfig#coroutineDispatcher, replaced by the new client wide 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 using signInWith(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

01 Apr 19:29
16e2a54
Compare
Choose a tag to compare

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

17 Mar 17:57
5481122
Compare
Choose a tag to compare

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

3.1.2

03 Mar 09:46
55d6089
Compare
Choose a tag to compare

Changes

This version requires Ktor version 3.1.1 or higher.

Core

Compose Auth

3.1.1

05 Feb 18:52
4f06243
Compare
Choose a tag to compare

Changes

Core

Realtime

  • Catch any exceptions when sending a message in realtime by @jan-tennert in #848