github supabase-community/supabase-kt 1.0.0

latest releases: 3.7.0-beta-1, 3.6.0, 3.5.0...
3 years 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

Don't miss a new supabase-kt release

NewReleases is sending notifications on new releases.