Skip to content

Releases: supabase-community/supabase-kt

2.6.1

05 Sep 09:38
bfdef00
Compare
Choose a tag to compare

Changes

Postgrest

  • Fix custom headers being ignored by Postgrest#rpc

2.6.0-wasm0

21 Jul 20:11
c9f8f86
Compare
Choose a tag to compare
2.6.0-wasm0 Pre-release
Pre-release

Note

The Ktor EAP repository is no longer required as a new official beta of Ktor 3.0.0 has been released. You will also need to use this exact Ktor version for your engines.

Changes

  • Migrate to Ktor 3.0.0-beta-2
  • Merge 2.4.2-2.6.0 changes into wasm

2.6.0

16 Aug 17:19
a07783f
Compare
Choose a tag to compare

Note

The documentation has also been updated. Checkout the third-party auth overview page if you want to use Firebase Auth, AWS Cognito or Auth0 instead of Supabase Auth.

Changes

Core

  • Update Kotlin to 2.0.10

Postgrest

  • Expose headers and params in PostgrestRequestBuilder by @jan-tennert in #689
    You can now set custom headers & url parameters while making a postgrest request

Auth

  • Add support for third-party auth by @jan-tennert in #688
    You can now use third-party auth providers like Firebase Auth instead of Supabase Auth by specifying a AccessTokenProvider in the SupabaseClientBuilder:
    val supabase = createSupabaseClient(supabaseUrl, supabaseKey) {
        accessToken = {
              //fetch the third party token
             "my-token"
        }
    }
    This will be used for the Authorization header and other modules like Realtime and Storage integrations!
    Note: The Auth plugin cannot be used in combination and will throw an exception if used when setting accessToken.
  • Changes to Multi-Factor-Authentication by @jan-tennert in #681
    • Refactor the syntax for enrolling MFA factors and add support for the Phone factor type:
      //Enrolling a phone factor
      val factor = client.auth.mfa.enroll(FactorType.Phone, friendlyName) {
          phone = "+123456789"
      }
      
      //Enrolling a TOTP factor
      val factor = client.auth.mfa.enroll(FactorType.TOTP, friendlyName) {
          issuer = "Issuer"
      }
    • Add a channel parameter to MfaApi#createChallenge to allow sending phone MFA messages to either SMS or WHATSAPP.
    • Deprecate MfaApi#loggedInUsingMfa and MfaApi#isMfaEnabled & their flow variants in favor of MfaApi#status and MfaApi#statusFlow:
      val (enabled, active) = client.auth.mfa.status
      
      //Flow variant
      client.auth.mfa.statusFlow.collect { (enabled, active) ->
          processChange(enabled, active)
      }
  • Add SlackOIDC OAuthProvider by @jan-tennert in #688

Realtime

  • Remove client-side rate-limiting in #678 by @jan-tennert
  • Fix broadcasting to a private channel via the HTTP API in #673 by @jan-tennert
  • Fix callbacks not getting removed correctly in the CallbackManager in #673 by @jan-tennert
  • Change internal realtime implementation to be more robust and testable in #673 by @jan-tennert
    • Add Realtime.Config#websocketFactory: This is highly internal and should be only modified if you know what you are doing

Storage

  • The StorageApi#authenticatedRequest method is now suspending
  • All uploading methods will now return a FileUploadResponse instead of a String, which includes the actual path and some other properties.

2.6.0-rc-1

15 Aug 15:37
6d914de
Compare
Choose a tag to compare
2.6.0-rc-1 Pre-release
Pre-release

Changes

Core

  • Update Kotlin to 2.0.10

Postgrest

  • Expose headers and params in PostgrestRequestBuilder by @jan-tennert in #689
    You can now set custom headers & url parameters while making a postgrest request

Auth

  • Add support for third-party auth by @jan-tennert in #688
    You can now use third-party auth providers like Firebase Auth instead of Supabase Auth by specifying a AccessTokenProvider in the SupabaseClientBuilder:
    val supabase = createSupabaseClient(supabaseUrl, supabaseKey) {
        accessToken = {
              //fetch the third party token
             "my-token"
        }
    }
    This will be used for the Authorization header and other modules like Realtime and Storage integrations!
    Note: The Auth plugin cannot be used in combination and will throw an exception if used when setting accessToken.
  • Changes to Multi-Factor-Authentication by @jan-tennert in #681
    • Refactor the syntax for enrolling MFA factors and add support for the Phone factor type:
      //Enrolling a phone factor
      val factor = client.auth.mfa.enroll(FactorType.Phone, friendlyName) {
          phone = "+123456789"
      }
      
      //Enrolling a TOTP factor
      val factor = client.auth.mfa.enroll(FactorType.TOTP, friendlyName) {
          issuer = "Issuer"
      }
    • Add a channel parameter to MfaApi#createChallenge to allow sending phone MFA messages to either SMS or WHATSAPP.
    • Deprecate MfaApi#loggedInUsingMfa and MfaApi#isMfaEnabled & their flow variants in favor of MfaApi#status and MfaApi#statusFlow:
      val (enabled, active) = client.auth.mfa.status
      
      //Flow variant
      client.auth.mfa.statusFlow.collect { (enabled, active) ->
          processChange(enabled, active)
      }
  • Add SlackOIDC OAuthProvider by @jan-tennert in #688

Storage

  • The StorageApi#authenticatedRequest method is now suspending
  • All uploading methods will now return a FileUploadResponse instead of a String, which includes the actual path and some other properties.

2.6.0-beta-1

30 Jul 23:00
1abb73e
Compare
Choose a tag to compare
2.6.0-beta-1 Pre-release
Pre-release

Changes

Realtime

  • Remove client-side rate-limiting in #678 by @jan-tennert
  • Fix broadcasting to a private channel via the HTTP API in #673 by @jan-tennert
  • Fix callbacks not getting removed correctly in the CallbackManager in #673 by @jan-tennert
  • Change internal realtime implementation to be more robust and testable in #673 by @jan-tennert
    • Add Realtime.Config#websocketFactory: This is highly internal and should be only modified if you know what you are doing.

2.5.4

27 Jul 16:59
0ab510a
Compare
Choose a tag to compare

Changes

Realtime

  • Fix deletion in postgresListDataFlow not working correctly by @jan-tennert in #671

2.5.3

21 Jul 20:10
c593973
Compare
Choose a tag to compare

Changes

Auth

Miscellaneous

  • Add link to a RESTful service sample built with supabase-kt by @hieuwu in #664

2.5.2

08 Jul 18:42
885eee8
Compare
Choose a tag to compare

Changes

Realtime

  • fix(realtime): add private to Realtime by @grdsdev in #642
    Add support for specifying if a channel is private via RealtimeChannelBuilder#isPrivate

Compose Auth

  • Fix Google sign in prompt in composeAuth by @Aaron246 in #648
  • fix(auth): fix sign in with Apple in ComposeAuth by @grdsdev in #654

New Contributors

2.5.1

28 Jun 14:57
a423191
Compare
Choose a tag to compare

Note

Thanks to @manriif you can now write & deploy Supabase Edge Functions completely in Kotlin via Kotlin/JS! Check out the supabase-edge-functions-kt repository for more information!

Changes

Auth

  • Ignore certain status codes when signing out a user by @jan-tennert in #633
    Failure of signing out because of invalid/expired JWTs will now be ignored and the local session cleared.

2.5.0

09 Jun 11:37
e2f28ee
Compare
Choose a tag to compare

Changes

Auth

  • Add error code enum for Auth API errors by @jan-tennert in #618
    All rest errors containing a error_code field will now throw a AuthRestException rather than generic BadRequestExceptions, etc.
    AuthRestExceptions contain a errorCode field of the type AuthErrorCode containing all known error codes.
    Two error codes have their own exceptions (but obviously inherit from AuthRestException): AuthWeakPasswordException and AuthSessionMissingException.
    API errors not containing this field will throw the generic exceptions.

  • Handle weak_password and session_not_found auth error codes by @jan-tennert in #596
    There is now a new subclass of RestException: AuthRestExcepton which will be a super class for exceptions based on error codes. Currently, there are two new exceptions: AuthWeakPasswordException and AuthSessionMissingException

  • Fix/improve session expiry calculation by @JOsacky in #610

Postgrest

  • Add columns header to PostgrestQueryBuilder#insert by @jan-tennert in #611
    This fixes an issue when inserting a list of objects where some objects might not have all keys.
  • Add defaultToNull parameter to PostgrestQueryBuilder#insert

Realtime

  • Use Postgrests propertyConversionMethod for getting the property name of primary keys
  • Add the possibility to have a multi-column PK in realtime by @iruizmar in #614
  • Fix presences updates for RealtimeChannel#presenceDataFlow working incorrectly by @JOsacky in #607

Compose Auth Ui

  • Add isError parameter to Compose Auth Ui fields by @jan-tennert in #612
  • Add AuthUiExperimental annotation by @iruizmar in #603
    All composables now have a AuthUiExperimental annotation instead of SupabaseExperimental

Misc

New Contributors