Releases: supabase-community/supabase-kt
Releases · supabase-community/supabase-kt
2.0.0-beta-2
2.0.0-beta-1
Note
If you can, please start to try out the 2.0.0 version(s) as there are alot of breaking changes from 1.5.X and I cannot test everything! :)
Migration guide will be on the development branch soon! Initial version: here
Changes
Core
- Add tag for all logging occurences
GoTrue
- Rename
Auth#sendRecoveryEmail
toAuth#resetPasswordForEmail
and add PKCE support (in #367 by @jan-tennert) - Rework internal implementation of OAuth & SSO login
- Add support for linking OAuth identities (experimental, untested as unsupported in hosted Supabase): (in #368 by @jan-tennert)
- Add
Auth#linkIdentity(OAuthProvider)
- The works the same assignInWith(OAuthProvider)
but links an additional OAuth provider to an authenticated user - Add
Auth#unlinkIdentity(identityId)
- Add
Auth#currentIdentitiesOrNull
- Add
2.0.0-alpha-2
Changes
Core
- Fix an issue causing the
Authorization
header not getting added to any request whenAuth
is not installed - Mark some DSL functions with an DSL marker
- Update to Kotlin 1.9.21 to fix an issue with klib dependencies
Postgrest
- Add
columns
parameter toPostgrestRequestBuilder#select
to allow restricting which columns to receive when usingUPDATE
,DELETE
,INSERT
2.0.0-alpha-1
Changes
Note: As this is a major version, this update contains breaking changes so be sure to read the changelog fully!
And feedback is definitely welcome and needed!
Core
- Remove
SupabaseClient#standaloneSupabaseModule
(because this function was misused a lot, you can essentially do the same by creating a SupabaseClient and then just callSupabaseClient#module
)
GoTrue
- Rename and refactor GoTrue methods and classes (in #337 by @jan-tennert):
- Rename
GoTrue
plugin toAuth
- Rename
GoTrueConfig
toAuthConfig
- Rename
SupabaseClient#gotrue
toSupabaseClient#auth
- Rename
Auth#loginWith
toAuth#signInWith
- Rename
Auth#logout
toAuth#signOut
- Rename
LogoutScope
toSignOutScope
- Rename
- Remove
Auth#sendOtpTo
and add newOTP
auth provider (in #350 by @jan-tennert):
supabase.auth.signInWith(OTP) {
email = "[email protected]"
}
- Refactor SSO auth to match other auth providers (in #351 by @jan-tennert):
supabase.auth.signInWith(SSO) {
domain = "domain"
}
- Rename
AdminUserUpdateBuilder#phoneNumber
toAdminUserUpdateBuilder#phone
- Rename
UserUpdateBuilder#phoneNumber
toUserUpdateBuilder#phone
- Rename
Phone.Config#phoneNumber
toPhone.Config#phone
Realtime
- Refactor and rename Realtime methods (in #349 by @jan-tennert):
- Rename
Realtime#createChannel
toRealtime#channel
- Remove
RealtimeChannel#join
and add newRealtimeChannel#subscribe
method, which does the same but also connects to the realtime websocket automatically - Add
Realtime.Config#connectOnSubscribe
to disable this behaviour - Rename
RealtimeChannel#leave
toRealtimeChannel#unsubscribe
- Add
SupabaseClient#channel
extension function delegating toRealtime#channel
- Rename
Realtime.Status
to reflect the new methods:UNSUBSCRIBED
SUBSCRIBING
SUBSCRIBED
UNSUBSCRIBING
- Rename
Postgrest
- Rename and refactor Postgrest methods (in #353 by @jan-tennert):
- Remove
upsert
parameter ininsert
andupdate
methods and add newupsert
method - Remove
returning
,count
andsingle
parameters from postgrest methods - Rework postgrest methods:
val result = supabase.postgrest["messages"].select {
single() //receive an object rather than an array
count(Count.EXACT) //receive amount of database entries
limit(10) //limit amount of results
range(2, 3) //change range of results
select() //return the data when updating/deleting/upserting (same as settings 'returning' to REPRESENTATION before)
filter {
eq("id", 1)
}
}
- Add new methods to this builder:
val result = supabase.postgrest["messages"].select {
csv() //receive data as csv
geojson() //receive data as geojson
explain(/* */) //debug queries
}
- Rename
PostgrestResult#count
toPostgrestResult#countOrNull
- Reanem
PostgrestResult#range
toPostgrestResult#rangeOrNull
- Add
SupabaseClient#from
delegating toPostgrest#from
- Rename
PostgrestResult#body
toPostgrestResult#data
- Change type of
PostgrestResult#data
toString
- Allow destructuring of
PostgrestResult
: (especially handy when dealing with datatypes other than json)
val (data, headers) = supabase.from("countries").select {
csv()
}
Compose Auth
- Refactor and rename Realtime methods (in #345 by @jan-tennert):
- Rename
ComposeAuth#rememberLoginWithGoogle
toComposeAuth#rememberSignInWithGoogle
- Rename
ComposeAuth#rememberLoginWithApple
toComposeAuth#rememberSignInWithApple
- Rename
ComposeAuth#rememberSignOut
toComposeAuth#rememberSignOutWithGoogle
- Rename
- Re-implement Credential Manager Native Google Auth on Android 14+ (in #336 by @jan-tennert)
New module: Coil Integration
This new plugin can be added to a Coil ImageLoader to easily display images from public and non-public buckets from storage (Android only)
(in #323 by @jan-tennert).
Learn more
New module: Compose-ImageLoader Integration
This new plugin can be added to a ImageLoader to easily display images from public and non-public buckets from storage (All Compose targets) (in #335 by @jan-tennert).
Learn more
1.4.7
Changes
GoTrue
- Change
UserInfo#appMetadata
type toJsonObject
to allow access to all keys and values
Storage
- Fix Storage documentation (by @shubhamsinghshubham777 in #329)
1.4.6
Changes
Core
- Update to Kotlin 1.9.20 and Compose 1.5.10
Compose Auth
- Downgrade play-store dependency to fix a error when using Native Google Auth
- Use Google Identity for signing out on Android 14 (until 1.5.X)
GoTrue
- Fix OAuth with Custom Tabs crashing
1.4.5
Changes
Postgrest
- Add missing generic overload for
PostgrestUpdate#set
- Fix serialization with
PostgrestUpdate
when not using KotlinX Serialization
1.4.4
1.4.3
1.4.2
Changes
GoTrue
- Add redirectUrl parameter and PKCE capabilities to
GoTrue#modifyUser
.