https://kotlinlang.org logo
Join Slack
Powered by
# supabase-kt
  • k

    Kashismails

    03/05/2025, 9:20 AM
    does supabase suport wasm?
    f
    j
    • 3
    • 3
  • n

    Novo Dimaporo

    03/07/2025, 8:37 AM
    Hello guys, just clarifying something with supabase database. Is the column name, updated_at automatically creates a trigger for updates? I created a table without updated_at column and then later on I decided that I need it, after adding the updated_at column it just works without me explicitly assigning functions and triggers. Sorry guys my bad, I have the triggers I just missed it.
    new.updated_at = now()
    .
    ✅ 1
  • n

    Niklas Wintrén

    03/13/2025, 8:53 PM
    I found that this channel exists; so perhaps you guys might have some input on my issues. I am unable to make a release of my app for Desktop. Android works fine, as well as web/wasm. Original post: https://kotlinlang.slack.com/archives/C01D6HTPATV/p1741858500964859 Basically it's one of these; • Proguard complains and I am not able to make a release build.
    Copy code
    io.ktor.network.sockets. SocketBase$ attachFor$ 1:  can't find enclosing method 'io.ktor.utils.io.ChannelJob attachFor(java.lang. String, io. ktor. utils. io. ByteChannel, kotlinx. atomicfu. AtomicRef, kotlin. jvm. functions. Function0) '  in program class io.ktor.network.sockets. SocketBase
    • I am able to make the releaseDistribution and it crashes on startup blaiming
    Copy code
    io.ktor.client.HttpClienEngineContainer:  Provider io.ktor.client.engine. cio. CIOEngineContainer not found
    j
    • 2
    • 13
  • h

    Hieu Vu

    03/16/2025, 2:39 PM
    Hi @Jan, is there a way in supabase-kt that allows user create tables, columns with their own Supabase credential? For example, when user first install the app, they fill in their credential and the app triggers some events to setup everything on their Suapabse dashboard
    j
    • 2
    • 4
  • b

    blakelee

    03/19/2025, 11:49 PM
    Hey, I see a new search field in the storage api. I was reading up on using prefix and it looks like that’s better for folders not filenames. But then I saw a search field. If I do something like this is it getting all the files then filtering them or is it only getting files with the search field?
    Copy code
    client.storage["avatar"]
      .list {
        search = profileId
      }
    I wanna make sure that I’m not fetching every file in a folder first because as the app gets big this query will take a long time
    j
    • 2
    • 1
  • r

    Remy Benza

    04/15/2025, 9:52 AM
    the
    isNew
    boolean inside
    SessionStatus
    class, is this a 100% guarantee the user is really new? meaning the supabase user database has no record for this user? Meaning if i sign in from a different platform (eg ios) and then sign in with same account on android the isNew will return false? Even when the session on that device is 'new' (no local storage)
    j
    • 2
    • 13
  • u

    Ume Channel

    04/20/2025, 3:29 PM
    Hello, how can you handle when the use is not confirmed in the first time they not confirmed the email. But the second time they want to confirmed the email. I'm using opt token to verify How can I make it when the token is expiring. Can i request a feature for exception for not confirmed email or adding session state to include the not_confirmed_email
    j
    • 2
    • 5
  • u

    Ume Channel

    04/21/2025, 3:12 PM
    I test an account that already confirmed but when I sign up again it didn't throw an exception instead asking for token? And the email sender didn't send I guess it is because it's already confirmed account. In AuthErrorCode.EmailExist should be possible but the AuthRestException doesn't throw
    j
    • 2
    • 2
  • c

    Colton Idle

    04/24/2025, 5:55 PM
    Feel like I'm going insane because ive had this working before in past project
    Copy code
    val results = supabaseClient.postgrest
            .from("requests")
            .select {
                filter { eq("username", "blah") }
                order("created_at", Order.ASCENDING)
                limit(50)
            }
    but getting a deserialization issue
    Encountered an unknown key 'upload_url'
    ✅ 1
    • 1
    • 3
  • c

    Colton Idle

    04/27/2025, 8:07 PM
    I'm making an edge function call that failed. The stack trace is helpful because i have an error msg from the function... but why doesn't it take me to the callsite? is that because of general weirdness with coroutine staack traces?
    j
    • 2
    • 8
  • c

    Colton Idle

    05/02/2025, 2:40 AM
    Yo. https://supabase.com/docs/guides/getting-started/tutorials/with-kotlin is sooooo good! If anyone has it read it... it basically just walks you through a real and complete app with a lot of best practices. 🫡
    💯 1
    kodee loving 2
  • c

    Colton Idle

    05/03/2025, 6:10 PM
    I'm using supabase 3.0 (can't upgrade due to reasons...) but I'm hitting an issue/difference between iOS and Android.
    Copy code
    val response =
      supabaseClient.functions.invoke("upload-image") {
        setBody(
          MultiPartFormDataContent(
            formData {
              append(
                "file",
                chosenPhoto!!,
                Headers.build {
                  append(
                    HttpHeaders.ContentType,
                    "image/png"
                  )
                  append(
                    HttpHeaders.ContentDisposition,
                    "form-data; name=\"image\"; filename=\"upload.png\"",
                  )
                })
            }
          )
        )
        contentType(ContentType.MultiPart.FormData)
      }
    in both cases. the upload completes successfully because i can see the result on the backend (uploads into a storage bucket) but I do actually get an error on the ios side. 🔴 HTTP request to https://myapp.supabase.co/functions/v1/upload-image (POST) failed with message: Content-Length mismatch: expected 434 bytes, but received 514 bytes on Android. no error.
    j
    • 2
    • 7
  • g

    Gabriel Santana

    05/07/2025, 1:30 AM
    heys, guys! someone already implemented google auth on iOS using the compose-auth? i can't make it work, i'm really stuck here. I have that beloved error: redirect_uri_mismatch. I can implement using the "native" google sdk but no success with supabase yet. if you have/know some sample, pls share with me.
    b
    n
    • 3
    • 18
  • k

    Kevin

    05/15/2025, 4:14 PM
    Is there support for using a custom browser fn for oauth flow with signinwith(Provider)? asking because im getting this error on linux Fedora
    java.lang.UnsupportedOperationException: The BROWSE action is not supported on the current platform!
    , and I already have a multi platform browser open fn util
    j
    • 2
    • 21
  • k

    Kevin

    05/23/2025, 9:53 PM
    was wondering if theres a way to modify the "backing" storage of the auth refresh token/access token. like a callback function for retrieving from local storage - this way i can hook into the intellij storage sdk
    j
    • 2
    • 4
  • t

    Thomas Valloo

    05/27/2025, 2:58 PM
    My KMP app is offline first, so what is the best way to handle supabase session ? • How to ensure that the session refreshes ? • If the session is lost, is there a way to refresh it without asking the user to log in again ? I didn't find resources on the subject, maybe there are ? Thanks :)
    j
    c
    • 3
    • 8
  • f

    F

    05/28/2025, 5:27 PM
    is there a way to prevent opening a browser when authenticating for example using Google, but open the tab within the app? in android we have the setting of
    defaultExternalAuthAction = ExternalAuthAction.CustomTabs()
    . what is the equivalent in ios?
    j
    • 2
    • 3
  • h

    Hieu Vu

    06/08/2025, 3:21 AM
    Hi @Jan , how can we get a full url of an image when upload to a private bucket? I uploaded normally without signed url and see the file available on Supabase dashboard but dont know what’s the full url of the file to display the image. I have tried uploading it with signed url with the Duration.Infinity but it seems to fail quitely.
    j
    c
    • 3
    • 3
  • k

    Kevin

    06/10/2025, 2:17 AM
    Im trying to debug why a refresh of access token didn't happen after the 50 min interval (see logs:)
    j
    • 2
    • 2
  • z

    Zach

    06/12/2025, 6:25 PM
    hey anyone getting supabase auth errors? getting
    Project not specified
    for a lot of my users for Google OAuth and Github OAuth
    j
    h
    • 3
    • 2
  • j

    Jan

    06/13/2025, 12:42 PM
    I've just released
    3.2.0-rc-1
    with a bunch of bug fixes and a few new features: https://github.com/supabase-community/supabase-kt/releases/tag/3.2.0-rc-1 Make sure to check it out!
    K 7
    b
    • 2
    • 1
  • h

    Hong Phuc

    06/17/2025, 9:11 AM
    hi all, can supabase do authorization on resource that doesn't exist on its database? spefically I'm trying to use supabase to authenticate my users, then they will have access to an api server to create resources on a separated backend, later on I want my user to have different roles so that they can only access the resources that they created, does supabase have any authorization feature that can achieve this? Thanks in advance
    j
    • 2
    • 2
  • u

    Ume Channel

    06/25/2025, 2:39 PM
    Good day! Hello I found out that the details is a JsonElement. I think it should be a string if I'm not mistaken public final class PostgrestRestException public constructor(message: kotlin.String, hint: kotlin.String?, details: kotlinx.serialization.json.JsonElement?, code: kotlin.String?, response: io.ktor.client.statement.HttpResponse) : io.github.jan.supabase.exceptions.RestException { public final val hint: kotlin.String? /* compiled code */ public final val details: kotlinx.serialization.json.JsonElement? /* compiled code */ public final val code: kotlin.String? /* compiled code */ }
    j
    • 2
    • 1
  • u

    Ume Channel

    06/25/2025, 2:47 PM
    I use the latest kotlinx datetime it is incompatible with current version of supabase kotlinx datetime
    j
    • 2
    • 4
  • n

    Nikola

    07/08/2025, 5:13 PM
    hello, im new in Supabase and kmp. Why i cant open chat demo sample found in https://github.com/supabase-community/supabase-kt/tree/master/sample/chat-demo-mpp in android studio?
    j
    • 2
    • 6
  • h

    Hieu Vu

    07/10/2025, 12:07 PM
    Hi @Jan, I am using Auth with PKCE. I see that all email sent with
    auth.resetPasswordForEmail
    auth.resendEmail
    In the url in the email, they are always contain code and token_hash value and not one in the Email configuration. Like
    {{ .ConfirmationURL }}?code=694bbb26-8514-4954-8050-113a56b3d53a&token_hash=pkce_231caed315d266012cabccd638753a692b0fc1a3b4c0c3ce31bceb46
    And not
    {{ .ConfirmationURL }}/?token_hash={{ .TokenHash }}&email={{ .Email }}
    So to handle the Reset Password and Sign Up flow, we will specify the redirectUrl and based on redirectUrl to handle with deeplinking. And call:
    Copy code
    supabaseAuth.verifyEmailOtp(
        type = OtpType.Email.EMAIL,
        tokenHash = tokenHash
    )
    In Reset Password , later I just update user with
    Copy code
    auth.updateUser {
       password = "secretPassword"
    }
    Is that correct? I use this for my sign up. Now I am implementing Reset Password flow and was confused if I need to use the
    code
    or
    token_hash
    or both for verification
    j
    • 2
    • 3
  • j

    Jan

    07/14/2025, 8:47 PM
    I've just released version 3.2.1, which should fix compatibility with KotlinX Datetime 0.7.0. I also moved the plugins to their own repository, let me know if anything changed. Also: I'm planning to attend the Supabase Meetup in Berlin next week and talk about Kotlin among other things!
    ❤️ 6
  • k

    Kevin

    07/15/2025, 6:18 AM
    is it possible to have supabase kt handle
    <https://localhost:51145/?code=7d6credacted>
    where the protocol is
    https
    . some of our users are in a corporate environment that default any browser http://localhost to redirect them to
    https
    for some reason
    j
    • 2
    • 5
  • h

    Hieu Vu

    07/18/2025, 5:59 AM
    Just sharing. In case if supabase-kt is eligible for this. https://kotlinfoundation.org/grants/
    j
    • 2
    • 1
  • j

    Jan

    07/23/2025, 8:17 PM
    Hi, in my talk tomorrow at the Supabase meetup I wanted to share some projects made with the Kotlin library. Feel free to share your projects in the thread :)
    K 2
    • 1
    • 1