Bot releases are hidden (Show)
Published by jan-tennert about 1 month ago
Postgrest#rpc
The documentation has also been updated. Checkout the third-party auth overview page if you want to use Firebase Auth, AWS Cognito or Auth0 instead of Supabase Auth.
2.0.10
headers
and params
in PostgrestRequestBuilder
by @jan-tennert in #689AccessTokenProvider
in the SupabaseClientBuilder
:
val supabase = createSupabaseClient(supabaseUrl, supabaseKey) {
accessToken = {
//fetch the third party token
"my-token"
}
}
This will be used for the Authorization
header and other modules like Realtime and Storage integrations!Auth
plugin cannot be used in combination and will throw an exception if used when setting accessToken
.//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"
}
channel
parameter to MfaApi#createChallenge
to allow sending phone MFA messages to either SMS
or WHATSAPP
.MfaApi#loggedInUsingMfa
and MfaApi#isMfaEnabled
& their flow variants in favor of MfaApi#status
and MfaApi#statusFlow
:
val (enabled, active) = client.auth.mfa.status
//Flow variant
client.auth.mfa.statusFlow.collect { (enabled, active) ->
processChange(enabled, active)
}
SlackOIDC
OAuthProvider
by @jan-tennert in #688CallbackManager
in #673 by @jan-tennertRealtime.Config#websocketFactory
: This is highly internal and should be only modified if you know what you are doingStorageApi#authenticatedRequest
method is now suspendingFileUploadResponse
instead of a String
, which includes the actual path and some other properties.Published by jan-tennert 2 months ago
2.0.10
headers
and params
in PostgrestRequestBuilder
by @jan-tennert in #689AccessTokenProvider
in the SupabaseClientBuilder
:
val supabase = createSupabaseClient(supabaseUrl, supabaseKey) {
accessToken = {
//fetch the third party token
"my-token"
}
}
This will be used for the Authorization
header and other modules like Realtime and Storage integrations!Auth
plugin cannot be used in combination and will throw an exception if used when setting accessToken
.//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"
}
channel
parameter to MfaApi#createChallenge
to allow sending phone MFA messages to either SMS
or WHATSAPP
.MfaApi#loggedInUsingMfa
and MfaApi#isMfaEnabled
& their flow variants in favor of MfaApi#status
and MfaApi#statusFlow
:
val (enabled, active) = client.auth.mfa.status
//Flow variant
client.auth.mfa.statusFlow.collect { (enabled, active) ->
processChange(enabled, active)
}
SlackOIDC
OAuthProvider
by @jan-tennert in #688StorageApi#authenticatedRequest
method is now suspendingFileUploadResponse
instead of a String
, which includes the actual path and some other properties.Published by jan-tennert 3 months ago
CallbackManager
in #673 by @jan-tennertRealtime.Config#websocketFactory
: This is highly internal and should be only modified if you know what you are doing.Published by jan-tennert 3 months ago
postgresListDataFlow
not working correctly by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/671
Published by jan-tennert 3 months ago
The Ktor EAP repository is no longer required as a new official beta of Ktor 3.0.0 has been released. You will also need to use this exact Ktor version for your engines.
2.4.2
-2.5.3
changes into wasmPublished by jan-tennert 3 months ago
Published by jan-tennert 3 months ago
(maven central release pending)
RealtimeChannelBuilder#isPrivate
Published by jan-tennert 4 months ago
Thanks to @manriif you can now write & deploy Supabase Edge Functions completely in Kotlin via Kotlin/JS! Check out the supabase-edge-functions-kt repository for more information!
Published by jan-tennert 4 months ago
Add error code enum for Auth API errors by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/618
All rest errors containing a error_code
field will now throw a AuthRestException
rather than generic BadRequestExceptions
, etc.
AuthRestException
s contain a errorCode
field of the type AuthErrorCode
containing all known error codes.
Two error codes have their own exceptions (but obviously inherit from AuthRestException)
: AuthWeakPasswordException
and AuthSessionMissingException
.
API errors not containing this field will throw the generic exceptions.
Handle weak_password
and session_not_found
auth error codes by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/596
There is now a new subclass of RestException
: AuthRestExcepton
which will be a super class for exceptions based on error codes. Currently, there are two new exceptions: AuthWeakPasswordException
and AuthSessionMissingException
Fix/improve session expiry calculation by @JOsacky in #610
PostgrestQueryBuilder#insert
by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/611defaultToNull
parameter to PostgrestQueryBuilder#insert
Postgrest
s propertyConversionMethod
for getting the property name of primary keysRealtimeChannel#presenceDataFlow
working incorrectly by @JOsacky in https://github.com/supabase-community/supabase-kt/pull/607
isError
parameter to Compose Auth Ui fields by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/612
AuthUiExperimental
annotation instead of SupabaseExperimental
Published by jan-tennert 5 months ago
error_code
field will now throw a AuthRestException
rather than generic BadRequestExceptions
, etc.AuthRestException
s contain a errorCode
field of the type AuthErrorCode
containing all known error codes.AuthRestException)
: AuthWeakPasswordException
and AuthSessionMissingException
.expiresAt
property was saved incorrectly, delaying the expiry date.
Postgrest
s propertyConversionMethod
for getting the property name of primary keysPublished by jan-tennert 5 months ago
expiresAt
property was saved incorrectly, delaying the expiry date.
Published by jan-tennert 5 months ago
PostgrestQueryBuilder#insert
by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/611defaultToNull
parameter to PostgrestQueryBuilder#insert
isError
parameter to Compose Auth Ui fields by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/612
Published by jan-tennert 5 months ago
AuthUiExperimental
annotation instead of SupabaseExperimental
weak_password
and session_not_found
auth error codes by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/596RestException
: AuthRestExcepton
which will be a super class for exceptions based on error codes. Currently, there are two new exceptions: AuthWeakPasswordException
and AuthSessionMissingException
RealtimeChannel#presenceDataFlow
working incorrectly by @JOsacky in https://github.com/supabase-community/supabase-kt/pull/607
Published by jan-tennert 5 months ago
SIGNUP
and MAGIC_LINK
OtpType
s are no longer deprecated as they are used for resending OTPs.sessionStatus
gets set to Authenticated
without the session actually saving to storage due to the cancellation.Published by jan-tennert 5 months ago
2.3.1
-2.4.1
changes into wasmPublished by jan-tennert 5 months ago
defaultToNull
to true
by @jan-tennert in https://github.com/supabase-community/supabase-kt/pull/590Published by jan-tennert 5 months ago
CancellationException
s in network requests by @jan-tennert in #578Auth#linkIdentity
will now return the OAuth URL if the config value ExternalAuthConfigDefaults.automaticallyOpenUrl
is set to false.autoRefresh
default value for Auth#importSession
not being set to config.alwaysAutoRefresh
codeVerifier
parameter to MemoryCodeVerifierCache
to be able to set an initial valuecaptchaToken
config option in the OTP
auth providerSettingsSessionManager
to work with multiple instances on the same device and add a key
parameter to the constructor in case you want a custom key by @MohamedRejeb in #572//Not a suspending function, subscribing and unsubscribing is handled internally
val myProductFlow: Flow<Product> = supabase.from("products").selectSingleValueAsFlow(Product::id) {
Product::id eq 2
}.collect {
println(it)
}
val productsFlow: Flow<List<Product>> = supabase.from("products").selectAsFlow(Product::id, filter = FilterOperation("id", FilterOperator.GT, 2)).collect {
println(it)
}
This requires both Realtime
and Postgrest
to be installed within the SupabaseClient.
region
parameter to invoke functions which allows changing the region where the Edge Function will be invoked in. Defaults to Functions.Config#defaultRegion
(which is FunctionRegion.ANY
) by @jan-tennert in #580Published by jan-tennert 5 months ago
Documentation will update shortly, after that I'll release the version.
Published by jan-tennert 6 months ago
CancellationException
s in network requests by @jan-tennert in #578Auth#linkIdentity
will now return the OAuth URL if the config value ExternalAuthConfigDefaults.automaticallyOpenUrl
is set to false.autoRefresh
default value for Auth#importSession
not being set to config.alwaysAutoRefresh
codeVerifier
parameter to MemoryCodeVerifierCache
to be able to set an initial valuecaptchaToken
config option in the OTP
auth providerSettingsSessionManager
to work with multiple instances on the same device and add a key
parameter to the constructor in case you want a custom key by @MohamedRejeb in #572//Not a suspending function, subscribing and unsubscribing is handled internally
val myProductFlow: Flow<Product> = supabase.from("products").selectSingleValueAsFlow(Product::id) {
Product::id eq 2
}.collect {
println(it)
}
val productsFlow: Flow<List<Product>> = supabase.from("products").selectAsFlow(Product::id, filter = FilterOperation("id", FilterOperator.GT, 2)).collect {
println(it)
}
This requires both Realtime
and Postgrest
to be installed within the SupabaseClient.
region
parameter to invoke functions which allows changing the region where the Edge Function will be invoked in. Defaults to Functions.Config#defaultRegion
(which is FunctionRegion.ANY
) by @jan-tennert in #580