supabase-kt

A Kotlin Multiplatform Client for Supabase.

MIT License

Stars
389
Committers
22

Bot releases are visible (Hide)

supabase-kt - 2.3.1

Published by jan-tennert 6 months ago

Changes

Storage

  • Make the default value for Storage.Config.resumable#cache null to prevent a NullPointerException in testing enviroments. (If it's set to null, the default cache implementation will be used)
  • Fix BucketApi#createSignedUploadUrl returning an invalid url
  • Fix BucketApi#createSignedUrl not correctly adding transformation parameters
  • Fix BucketApi#createSignedUrl returning an invalid url
  • Fix BucketListFilter#sortBy not working correctly
  • Add missing destinationBucket parameter to BucketApi#copy and BucketApi#move by @jan-tennert in #562

Auth

  • Move enableLifecycleCallbacks to the common source set (still only used on Android) by @jan-tennert in #561
  • Add AuthConfig#minimalSettings (useful for servers or testing, disabling session storage and uses only in-memory caches) by @jan-tennert in #561

Realtime

  • Remove the suspend modifier for RealtimeChannel#postgresListDataFlow by @jan-tennert in #563
  • When a postgres flow is closed, the joining payload will now be correctly cleaned by @jan-tennert in #563
supabase-kt - 2.3.0

Published by jan-tennert 6 months ago

Changes

Core

  • Update Kotlin to 2.0.0-RC1

Postgrest

Realtime

  • Stabilize new flow presence and postgres methods by @jan-tennert in #535

Auth

New Contributors

supabase-kt - 2.3.0-rc-2

Published by jan-tennert 6 months ago

Changes

Core

  • Update Kotlin to 2.0.0-RC1

Postgrest

supabase-kt - 2.3.0-rc-1

Published by jan-tennert 6 months ago

Changes

Postgrest

New Contributors

supabase-kt - 2.3.0-beta-2

Published by jan-tennert 7 months ago

Changes

Realtime

  • Stabilize new flow presence and postgres methods by @jan-tennert in #535

Auth

Postgrest

supabase-kt - 2.3.0-beta-1

Published by jan-tennert 7 months ago

Note

There is now a Slack channel for supabase-kt!

Changes

Auth

supabase-kt - 2.2.3

Published by jan-tennert 7 months ago

Note

There is now a Slack channel for supabase-kt!

Changes

Compose Auth

supabase-kt - 2.2.2-wasm0

Published by jan-tennert 7 months ago

Changes

Add wasm-js support for compose-auth, compose-auth-ui and apollo-graphql.

Auth

  • Migrate HTTP Callback Servers to use Ktor 3.0.0

Note

supabase-kt - 2.2.2

Published by jan-tennert 7 months ago

Changes

Core

Postgrest

Auth

  • Change default value of OTP.Config#createUser to true to match docs and other client libs
  • Add support for anonymous sign ins by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/497 (experimental, as untested)
  • Rename phoneNumber parameter in Auth#resendPhone to phone.

Realtime

  • Deprecate Realtime.Config#eventsPerSecond (yes, I know this was just introduced, but apparently all other client libs are now also deprecating it)
supabase-kt - 2.2.1

Published by jan-tennert 8 months ago

Changes

Compose Auth UI

Realtime

supabase-kt - 2.2.0

Published by jan-tennert 8 months ago

Changes

Core

  • Reworked internal logging to support new features, including:
    • Setting the default logging level within the SupabaseClientBuilder:
      val supabase = createSupabaseClient(url, key) {
         defaultLogLevel = LogLevel.WARNING
      }
      
      Note: The default logging level is set to LogLevel.INFO
    • Changing the logging level per plugins:
      Auth.setLogLevel(LogLevel.NONE)
      
    • Overall better and more debug log messages

Auth

  • Changes to SessionStatus:
    • The Authenticated now has a source property which can be Storage, SignIn, SignUp, Refresh, External, UserChanged, UserIdentitiesChanged or Unknown
    • The Authenticated now also has a isNew property which returns true if the source is either SignIn, SignUp or External
    • The NotAuthenticated status is now a data class rather than an object and has a isSignOut property
  • Rename Auth#oAuthUrl to Auth#getOAuthUrl
  • Changes to OAuth using Http Callback Servers:
    • Switch to Ktor for Http Callback Servers when using OAuth on Desktop targets. Signing in using an OAuth provider e.g. with signInWith(Google) will now block the current coroutine until the flow succeeds or times out.
    • Add support for using a Http Callback Server for OAuth in the Kotlin macosX64* and linuxX64 targets
      * Only used if no deeplink host & scheme or a default redirect url is provided.
    • Add AuthConfig#httpCallbackConfig() method for configuring these servers.
  • Add host and scheme auth config properties to common code (will still not used by all targets)
  • Add AuthConfig#defaultRedirectUrl to override the default redirect url used for requests. Defaults to null, which means that everything stays as it is; Desktop targets will use a http callback server, mobile targets deeplinks, etc.

Compose Auth

  • (Android) The Credential Manager will now always be used for all Android versions
  • By default, when signing out using Auth#signOut or Auth#clearSession the Google credential will now also be cleared.
    • Because sign-outs are now handled automatically, ComposeAuth#rememberSignOutWithGoogle has been removed.
  • You now pass in the nonce and extraData when calling startFlow rather than in the plugin settings.
    • If no nonce parameter is specified (or not set to null manually), the library will now take care of generating a nonce and using it for authentication.
  • NativeSignInState#started has been changed to NativeSignInState#status which can be Started or NotStarted
  • The Apple Native Sign-In method no longer has any arguments, as they are not needed. Note: I don't think that fixes the Apple Native Sign-In problem.
  • Add debug logs and log exceptions caught while trying Native Sign-In

Realtime

  • Add support for realtime message throttling in #471
    There is now a new realtime config property: eventsPerSecond (default is 10), which configures a client-side rate-limit for sending broadcasts, presence updates etc. If this rate-limit is exceeded, any message within this duration will fail.
    Set to a negative number to disable.
    Check the Supabase docs for more information.
supabase-kt - 2.1.6

Published by jan-tennert 8 months ago

Changes

Postgrest

  • Fix ordering by multiple columns by @jan-tennert in #493
supabase-kt - 2.2.0-rc-1

Published by jan-tennert 8 months ago

Note

WASM support will be skipped again as Ktor won't be releasing a stable version supporting WASM-JS anytime soon.

Changes

Auth

  • Add SessionStatus.Authenticated#isNew: This will be true if the session source is a sign in, sign up or is external. Use this to to determine whether you e.g. change the screen.
supabase-kt - 2.2.0-alpha-2

Published by jan-tennert 8 months ago

Changes

Auth

  • Changes to SessionStatus:
    • The Authenticated now has a source property which can be Storage, SignIn, SignUp, Refresh, External, UserChanged, UserIdentitiesChanged or Unknown
    • The NotAuthenticated status is now a data class rather than an object and has a isSignOut property

Compose Auth

  • (Android) The Credential Manager will now always be used for all Android versions
  • By default, when signing out using Auth#signOut or Auth#clearSession the Google credential will now also be cleared.
  • You now pass in the nonce and extraData when calling startFlow rather than in the plugin settings.
  • If no nonce parameter is specified (or not set to null manually), the library will now take care of generating a nonce and using it for authentication.
  • NativeSignInState#started has been changed to NativeSignInState#status which can be Started or NotStarted
  • The apple native sign in method no longer has any arguments, as they are not needed. Note: I don't think that fixes the Apple Native Sign in problem.
supabase-kt - 2.1.5

Published by jan-tennert 8 months ago

Changes

Realtime

New Contributors

supabase-kt - 2.1.4

Published by jan-tennert 8 months ago

Changes

Postgrest

Full Changelog: https://github.com/supabase-community/supabase-kt/compare/2.1.3...2.1.4

supabase-kt - 2.2.0-alpha-1

Published by jan-tennert 8 months ago

Changes

Core

  • Reworked internal logging to support new features including:
    • Setting the default logging level within the SupabaseClientBuilder:
      val supabase = createSupabaseClient(url, key) {
         defaultLogLevel = LogLevel.WARNING
      }
      
      Note: The default logging level is set to LogLevel.INFO
    • Changing the logging level per plugins:
      Auth.setLoggingLevel(LogLevel.NONE)
      
    • Overall better and more debug log messages

Auth

  • Rename Auth#oAuthUrl to Auth#getOAuthUrl
  • Switch to Ktor for Http Callback Servers when using OAuth on Desktop targets. Signing in using an OAuth provider e.g. with signInWith(Google) will now block the current coroutine until the flow succeeds or times out.
  • Add support for using a Http Callback Server for OAuth in the Kotlin macosX64* and linuxX64 targets
    * Only used if no deeplink host & scheme or a default redirect url is provided.
  • Add AuthConfig#httpCallbackConfig() method for configuring these servers.
  • Add host and scheme auth config properties to common code (will still not used by all targets)
  • Add AuthConfig#defaultRedirectUrl to override the default redirect url used for requests. Defaults to null, which means that everything stays as it is; Desktop targets will use a http callback server, mobile targets deeplinks, etc.

Realtime

  • Add support for realtime message throttling in #471
    There is now a new realtime config property: eventsPerSecond (default is 10), which configures a client-side rate-limit for sending broadcasts, presence updates etc. If this rate-limit is exceeded, any message within this duration will fail.
    Set to a negative number to disable.
    Check the Supabase docs for more information.
supabase-kt - 2.1.3

Published by jan-tennert 9 months ago

Changes

Auth

  • [Android]: If enableLifecycleCallbacks is set to true and the app goes to background, the sessionStatus value will get set to LoadingFromState (before it wasn't changed at all). This fixes a problem that caused other plugins to use a potentially expired session after the app goes back into foreground because the session wasn't refreshed yet.
    Note: You obviously have to handle the LoadingFromStorage status, e.g. by showing a loading screen.
    On the client side, it will be on LoadingFromStorage and then back to Authenticated once the session is definitely valid.
  • Add oldStatus property to SessionStatus.Authenticated. This can be used to check if a new status emitted is just a refresh (so the oldStatus will just be Authenticated), or an actual login (e.g. oldStatus will be NotAuthenticated)

Full Changelog: https://github.com/supabase-community/supabase-kt/compare/2.1.2...2.1.3

supabase-kt - 2.1.2

Published by jan-tennert 9 months ago

Changes

GoTrue

supabase-kt - 2.1.1

Published by jan-tennert 9 months ago

Changes

Postgrest

New Contributors