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#importAuthTokenparameters:jwtrenamed toaccessToken, added optionalrefreshToken,autoRefreshandretrieveUser - Deprecated
startAutoRefresh(session)useimportSessioninstead - Add
GoTrue#currentUserOrNull() - Add
autoSaveToStoragetoGoTrueConfig - Deprecate
GoTrue#invalidateSessionin favor ofGoTrue#logout - Add
AdminApi#logout(jwt) - Add
dataproperty to Email/Phone providers - Add
dataparameter tosendOtpTo& add overload for specifying a serializable value - Improve internal serialization of DefaultAuthProviders
- Add
channelproperty toPhone.Configto support sending OTPs to WhatsApp - Add support for paging when retrieving user in
AdminApi - Add missing
LinkType.EmailChangeNew - Deprecate
GoTrue#invalidateAllRefreshTokens(). Uselogoutinstead. - Fix
GoTrue#retrieveUserForCurrentSessionnot saving the session correctly. - Change
MfaApi#isMfaEnabledto only return true when a verified factor is available. - Deprecate
GoTrue#updateCurrentUser(). UseretrieveUserForCurrentSession(updateSession = true)instead. - Add experimental support for SSO Logins (untested, feedback appreciated)
SSO LoginsWorks same as oauth, deeplinking used for mobile and http callback server on desktopclient.gotrue.loginWith(SSO.withProvider("providerId")) client.gotrue.loginWith(SSO.withDomain("domain"))
- Add
GoTrue#retrieveSSOUrl(type) - Add experimental support for the PKCE login flow. Changing to it is as simple as:
Note: You can customize the way the code verifiers get saved in the GoTrue config
//change the login flow to PKCE in the GoTrue configuration val client = createSupabaseClient(url, key) { install(GoTrue) { flowType = FlowType.PKCE } }
- 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&queryParamsproperties to OAuth configuration:client.gotrue.loginWith(Google) { scopes.add("email") queryParams["key"] = "value" }
- Add missing properties to UserSession:
providerToken&providerRefreshToken
Postgrest
- Add methods to
PostgrestFilterBuilderlikeAll,likeAny,ilikeAll,ilikeAny(which are not yet supported in supabase)
Realtime
- Remove
Realtime.Config#customRealtimeURL. UsecustomUrlinstead. - 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 callbroadcastandtrackwithout any problems directly afterjoin
Storage
- Add default value for
BucketApi#list - Add new
Storage#updateBucketmethod - Deprecate
Storage#changePublicStatususeupdateBucketinstead - Rename
BucketApi#createUploadSignedUrltoBucketApi#createSignedUploadUrl