supabase-kt

A Kotlin Multiplatform Client for Supabase.

MIT License

Stars
389
Committers
22

Bot releases are hidden (Show)

supabase-kt - 1.2.0-alpha-2

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Improved timing of auto refresh to prevent delays.
  • Resolved instantiation problems causing NullPointerExceptions.

Realtime

  • Fixed access token update during token refresh.
  • Implemented error handling when attempting to join a channel without an active Realtime connection.
supabase-kt - 1.1.1

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Improved timing of auto refresh to prevent delays.
  • Resolved instantiation problems causing NullPointerExceptions.

Realtime

  • Fixed access token update during token refresh.
  • Implemented error handling when attempting to join a channel without an active Realtime connection.
supabase-kt - 1.2.0-alpha-1

Published by jan-tennert over 1 year ago

Changes

Core

  • Update Kotlin to 1.9.0
  • Add watchOS Kotlin targets: watchosArm64, watchosX64, watchosSimulatorArm64
  • Add tvOS Kotlin targets: tvosArm64, tvosX64, tvosSimulatorArm64
  • Add support for NodeJS in Kotlin/JS

GoTrue

  • Add Figma OAuthProvider
  • Add Kakao OAuthProvider
  • Add Fazebook IDTokenProvider
  • Make Azure an IDTokenProvider
  • Add logout scope option #220
  • Update IDToken Provider config properties #221
supabase-kt - 1.1.0

Published by jan-tennert over 1 year ago

Changes

Core

  • Add support for:
    • MacOS (macosX64 & macosArm64) (same as IOS)
    • Windows (mingwX64) (no built-in otp/oauth handling)
    • Linux (linuxX64) (no built-in otp/oauth handling)
  • Add support for custom serializers (https://github.com/supabase-community/supabase-kt/pull/205)
  • Add SupabaseClientBuilder#defaultSerializer
  • Add moshi serializer:
implementation("io.github.jan-tennert.supabase:serializer-moshi:VERSION")
val client = createSupabaseClient(url, key) {
    defaultSerializer = MoshiSerializer()
}
  • Add jackson serializer:
implementation("io.github.jan-tennert.supabase:serializer-jackson:VERSION")
val client = createSupabaseClient(url, key) {
    defaultSerializer = JacksonSerializer()
}
  • Add PlatformTargets: MACOS, WINDOWS, LINUX, WASM
  • Rename PlatformTarget: WEB -> JS, DESKTOP -> JVM
  • Rename package which includes SupabaseInternal and SupabaseExperimental from annotiations to annotations
  • Add X-Client-Info header #197 (suggested in #196)
  • Replace Napier logging with Kermit (just rename Napier to Logger, syntax is the same)

GoTrue

  • Add MemorySessionManager (default for linux)
  • Add MemoryCodeVerifierCache (default for linux)

Storage

  • Rename classes:
    • ResumableCache.Disk -> SettingsResumableCache
    • ResumableCache.Memory -> MemoryResumableCache
  • Extract flow variants of upload/download methods to another file
supabase-kt - 1.1.0-rc-1

Published by jan-tennert over 1 year ago

Changes

Core

  • Fix SupabaseSerializer#encodeToJsonElement method using the wrong function (resulting in a serialization error) (fixes #211)
supabase-kt - 1.1.0-beta-2

Published by jan-tennert over 1 year ago

Changes

Requires Repository: https://maven.pkg.jetbrains.space/public/p/ktor/eap

Core

  • Add SupabaseClientBuilder#defaultSerializer
  • Add moshi serializer:
implementation("io.github.jan-tennert.supabase:serializer-moshi")
val client = createSupabaseClient(url, key) {
    defaultSerializer = MoshiSerializer()
}
  • Add jackson serializer:
implementation("io.github.jan-tennert.supabase:serializer-jackson")
val client = createSupabaseClient(url, key) {
    defaultSerializer = JacksonSerializer()
}
supabase-kt - 1.1.0-beta-1

Published by jan-tennert over 1 year ago

Changes

Requires Repository: https://maven.pkg.jetbrains.space/public/p/ktor/eap

Core

  • Add support for custom serializers (#205)
  • Removed support for NodeJS (for now)
supabase-kt - 1.1.0-alpha-1

Published by jan-tennert over 1 year ago

Changes

Requires Repository: https://maven.pkg.jetbrains.space/public/p/ktor/eap

Core

  • Add support for:
    • JS (NodeJS)
    • MacOS (macosX64 & macosArm64) (same as IOS)
    • Windows (mingwX64) (no built-in otp/oauth handling)
    • Linux (linuxX64) (no built-in otp/oauth handling)
  • Add PlatformTargets: MACOS, WINDOWS, LINUX, WASM
  • Rename PlatformTarget: WEB -> JS, DESKTOP -> JVM
  • Rename package which includes SupabaseInternal and SupabaseExperimental from annotiations to annotations
  • Add X-Client-Info header #197 (suggested in #196)
  • Replace Napier logging with Kermit (just rename Napier to Logger, syntax is the same)

GoTrue

  • Add MemorySessionManager (default for linux)
  • Add MemoryCodeVerifierCache (default for linux)

Storage

  • Rename classes:
    • ResumableCache.Disk -> SettingsResumableCache
    • ResumableCache.Memory -> MemoryResumableCache
  • Extract flow variants of upload/download methods to another file

Dependencies

  • remove stately
  • remove cache4k
  • remove napier
  • add kermit
supabase-kt - 1.0.4

Published by jan-tennert over 1 year ago

Changes

Core

  • Update Ktor to fix Kotlin Native compilation error

Requires Ktor Repository: https://maven.pkg.jetbrains.space/public/p/ktor/eap

supabase-kt - 1.0.3

Published by jan-tennert over 1 year ago

Changes

Core

Postgrest

New Contributors

supabase-kt - 1.0.2

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Fix authentication header not being added when GoTrue isn't installed
supabase-kt - 1.0.1

Published by jan-tennert over 1 year ago

Changes

Functions

  • Add support for custom domains and vanity domains
supabase-kt - 1.0.0

Published by jan-tennert over 1 year ago

Changes

Note: I don't consider this release more stable than the previous releases as I'm still one person, but I think its pretty much feature-complete in comparison to the JavaScript SDK. As always, when finding bugs or if you have a suggestion/feature request feel free to open an issue.

Core

  • Add detekt plugin
  • Add new documentation
  • Add demo for integrating multi-factor authentication in a compose app.
  • Add new demo showcasing how to implement Google Native/OneTap sign in on android & use an in-app web browser for oauth
  • Change some collections to a IsoMutableCollection

GoTrue

  • Remove session information in browser after successfully logging in using OAuth on Desktop & Web from the current browser url. (and remove it from history)
  • Remake GoTrue#modifyUser: You don't specify a Provider anymore, you can just use the builder to modify everything.
  • Add GoTrue#resendEmail
  • Add GoTrue#resendPhone
  • Change GoTrue#importAuthToken parameters: jwt renamed to accessToken, added optional refreshToken, autoRefresh and retrieveUser
  • Deprecated startAutoRefresh(session) use importSession instead
  • Add GoTrue#currentUserOrNull()
  • Add autoSaveToStorage to GoTrueConfig
  • Deprecate GoTrue#invalidateSession in favor of GoTrue#logout
  • Add AdminApi#logout(jwt)
  • Add data property to Email/Phone providers
  • Add data parameter to sendOtpTo & add overload for specifying a serializable value
  • Improve internal serialization of DefaultAuthProviders
  • Add channel property to Phone.Config to support sending OTPs to WhatsApp
  • Add support for paging when retrieving user in AdminApi
  • Add missing LinkType.EmailChangeNew
  • Deprecate GoTrue#invalidateAllRefreshTokens(). Use logout instead.
  • Fix GoTrue#retrieveUserForCurrentSession not saving the session correctly.
  • Change MfaApi#isMfaEnabled to only return true when a verified factor is available.
  • Deprecate GoTrue#updateCurrentUser(). Use retrieveUserForCurrentSession(updateSession = true) instead.
  • Add experimental support for SSO Logins (untested, feedback appreciated)
    SSO Logins
    client.gotrue.loginWith(SSO.withProvider("providerId"))
    client.gotrue.loginWith(SSO.withDomain("domain"))
    
    Works same as oauth, deeplinking used for mobile and http callback server on desktop
  • Add GoTrue#retrieveSSOUrl(type)
  • Add experimental support for the PKCE login flow. Changing to it is as simple as:
    //change the login flow to PKCE in the GoTrue configuration
    val client = createSupabaseClient(url, key) {
        install(GoTrue) {
            flowType = FlowType.PKCE 
        }
    }
    
    Note: You can customize the way the code verifiers get saved in the GoTrue config
  • Add GoTrue#exchangeCodeForSession(code)
  • Expose GoTrue#parseFragmentAndImportSession(fragment), so you don't have to parse all this by yourself when using a custom OAuth implementation
  • Add GoTrue#oAuthUrl(provider), to easily get the oauth url when using a custom implementation
  • Add scopes & queryParams properties to OAuth configuration:
    client.gotrue.loginWith(Google) {
       scopes.add("email")
       queryParams["key"] = "value"
    } 
    
  • Add missing properties to UserSession: providerToken & providerRefreshToken

Postgrest

  • Add methods to PostgrestFilterBuilder likeAll, likeAny, ilikeAll, ilikeAny (which are not yet supported in supabase)

Realtime

  • Remove Realtime.Config#customRealtimeURL. Use customUrl instead.
  • Expose Realtime#removeChannel(channel)
  • Add Realtime#removeAllChannels
  • Add function parameter to RealtimeChannel#join: blockUntilJoined. If this parameter is set to true, this method will block until the RealtimeChannel actually joined, so you call broadcast and track without any problems directly after join

Storage

  • Add default value for BucketApi#list
  • Add new Storage#updateBucket method
  • Deprecate Storage#changePublicStatus use updateBucket instead
  • Rename BucketApi#createUploadSignedUrl to BucketApi#createSignedUploadUrl
supabase-kt - 1.0.0-rc-2

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Add PKCE to OAuth
  • Remove session information in browser after successfully logging in using OAuth on Desktop & Web from the current browser url. (and remove it from history)
supabase-kt - 1.0.0-rc-1

Published by jan-tennert over 1 year ago

Changes

Core

  • Add detekt plugin
  • Improve & add missing documentation
  • Improve internal code

GoTrue

  • Add missing autoRefresh paramter to GoTrue#importAuthToken()

Note: I made some big internal changes, as long as everything still works as expected, I'll release that version.

supabase-kt - 1.0.0-beta-1

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Add GoTrue#resendEmail
  • Add GoTrue#resendPhone

Postgrest

  • Add methods to PostgrestFilterBuilder likeAll, likeAny, ilikeAll, ilikeAny (which are not yet supported in supabase)
supabase-kt - 1.0.0-alpha-5

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Change GoTrue#importAuthToken parameters: jwt renamed to accessToken, added optional refreshToken and retrieveUser
  • Deprecated startAutoRefresh(session) use importSession instead
  • Add GoTrue#currentUserOrNull()
  • Add autoSaveToStorage to GoTrueConfig

Dependency updates

  • Update coroutines to 1.7.1
supabase-kt - 1.0.0-alpha-4

Published by jan-tennert over 1 year ago

Changes

Core

Realtime

  • Fix exception when using Realtime#subscriptions

Dependency updates

  • Update Coroutines to 1.7.0
supabase-kt - 1.0.0-alpha-3

Published by jan-tennert over 1 year ago

Changes

Core

  • Add demo for integrating multi-factor authentication in a compose app.

GoTrue

  • Add support for paging when retrieving user in AdminApi
  • Add missing LinkType.EmailChangeNew
  • Deprecate GoTrue#invalidateAllRefreshTokens(). Use logout instead.
  • Fix GoTrue#retrieveUserForCurrentSession not saving the session correctly.
  • Change MfaApi#isMfaEnabled to only return true when a verified factor is available.
  • Deprecate GoTrue#updateCurrentUser(). Use retrieveUserForCurrentSession(updateSession = true) instead.

Realtime

  • Remove Realtime.Config#customRealtimeURL. Use customUrl instead.
supabase-kt - 1.0.0-alpha-2

Published by jan-tennert over 1 year ago

Changes

GoTrue

  • Deprecate GoTrue#invalidateSession in favor of GoTrue#logout
  • Add AdminApi#logout(jwt)
  • Add data property to Email/Phone providers
  • Add data parameter to sendOtpTo & add overload for specifying a serializable value
  • Improve internal serialization of DefaultAuthProviders
  • Add channel property to Phone.Config to support sending OTPs to WhatsApp

Postgrest

  • Change functions with a range parameter in PostgrestFilterBuilder to Pair<Any, Any> instead of LongRange to support other ranges
  • Add missing KProperty overloads to PostgrestFilterBuilder

Realtime

  • Expose Realtime#removeChannel(channel)
  • Add Realtime#removeAllChannels
  • Add function parameter to RealtimeChannel#join: blockUntilJoined. If this parameter is set to true, this method will block until the RealtimeChannel actually joined, so you call broadcast and track without any problems directly after join

Storage

  • Add default value for BucketApi#list

Core

  • Change some collections to a IsoMutableCollection

Dependency updates

  • Add stately as a core dependency