Changes
Core
- Update Kotlin to
2.0.10
Postgrest
- Expose
headersandparamsinPostgrestRequestBuilderby @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 aAccessTokenProviderin theSupabaseClientBuilder:This will be used for theval supabase = createSupabaseClient(supabaseUrl, supabaseKey) { accessToken = { //fetch the third party token "my-token" } }
Authorizationheader and other modules like Realtime and Storage integrations!
Note: TheAuthplugin cannot be used in combination and will throw an exception if used when settingaccessToken. - 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
channelparameter toMfaApi#createChallengeto allow sending phone MFA messages to eitherSMSorWHATSAPP. - Deprecate
MfaApi#loggedInUsingMfaandMfaApi#isMfaEnabled& their flow variants in favor ofMfaApi#statusandMfaApi#statusFlow:val (enabled, active) = client.auth.mfa.status //Flow variant client.auth.mfa.statusFlow.collect { (enabled, active) -> processChange(enabled, active) }
- Refactor the syntax for enrolling MFA factors and add support for the Phone factor type:
- Add
SlackOIDCOAuthProviderby @jan-tennert in #688
Storage
- The
StorageApi#authenticatedRequestmethod is now suspending - All uploading methods will now return a
FileUploadResponseinstead of aString, which includes the actual path and some other properties.