https://supabase.com/ logo
Join DiscordCommunities
Powered by
# javascript
  • b

    Bryson_W

    04/24/2022, 3:41 PM
    @arcavid Wassup bro, just tried it and it works ๐Ÿ™
  • b

    Bryson_W

    04/24/2022, 4:18 PM
    Still getting an error when getting the user by id and their image
  • s

    silentworks

    04/24/2022, 8:12 PM
    @Bryson_W I wonder if itโ€™s related to https://twitter.com/kikisad_/status/1517848596338651138?s=21&t=5g6IWc_dz4g5cvH9J-4pwQ
  • b

    Bryson_W

    04/24/2022, 10:17 PM
    @silentworks not sure - but I switched dbs because of it
  • b

    Bryson_W

    04/24/2022, 10:17 PM
    its a great product but they still have some bugs to figure out
  • b

    Bryson_W

    04/25/2022, 5:16 AM
    @silentworks nvm haha I really wanted to build with supabase so I tried again, and it turns out my error was caused by not implementing the fallback correctly when checking for updates with static props
  • b

    Bryson_W

    04/25/2022, 5:16 AM
    App now works ๐Ÿ™‚
  • s

    silentworks

    04/25/2022, 7:38 AM
    Iโ€™m happy to hear itโ€™s all working now
  • v

    Vidski

    04/25/2022, 11:22 AM
    Hey, I'm kinda confused by the oauth flow. When calling signIn, shouldnt I be redirect to konga/auth/v1/callback and not to my page after authentication?
  • v

    Vidski

    04/25/2022, 11:30 AM
    Got it, I thought the env REDIRECT_URI was supposed to be my site, and not konga
  • k

    kaiba

    04/25/2022, 5:45 PM
    Getting a lot of "An invalid response was received from the upstream server" when trying to insert or query sometimes, anything we can do to diagnose the issue? Also on the paid plan
  • c

    core

    04/25/2022, 11:35 PM
    Has somebody tried to code a Discord bot with a Supabase backend?
  • s

    Studywithdesign

    04/26/2022, 7:43 AM
    how can get this problem solved:
    const { data: posts, error } = await supabase.from("students").select("id, name, study(tutorial_id)");
    in which study is the referencing table for many to many relationships. But when I fetch
    study(tutorial_id)
    it gives me an array. I just want specific tutorial_id where the user matches the row
    g
    • 2
    • 4
  • g

    garyaustin

    04/26/2022, 2:28 PM
    filter on join table
  • s

    stnmonroe

    04/27/2022, 2:56 AM
    Hi there I m having trouble with scopes
  • o

    omri

    04/28/2022, 12:52 PM
    how does one use
    supabase.auth.setAuth
    ?
    const { user } = supabase.auth.setAuth(myAccessToken)
    seems to save the access token in the client but it doesn't fetch the user data which we use to check if the user is logged in (and which also allows us to take advantage of RLS, without an active user we get no data on api calls with RLS enabled). i've checked my access token, it seems to be a valid jwt containing my account data. it's acquired by manually opening
    $MY_SUPABASE_URL/auth/v1/authorize?provider=google&redirect_to=$MY_REDIRECT_URL
    using
    browser.identity.launchWebAuthFlow
    in a browser extension (where we can't have the supabase client manage its own windows) and then parsing the returned redirect url. am i missing something?
  • o

    omri

    04/28/2022, 12:53 PM
    we're also going to need to use
    setAuth
    to manually restore session data from
    browser.storage
    on startup, since it's recommended for use in extensions over
    localStorage
    .
  • o

    omri

    04/28/2022, 12:54 PM
    here's how the client is created:
    Copy code
    ts
    export const supabase = createClient(supabaseUrl, supabaseKey, {
      autoRefreshToken: true,
      shouldThrowOnError: false,
    });
  • o

    omri

    04/28/2022, 1:13 PM
    update: i have managed to get a user using this snippet:
    Copy code
    ts
    supabase.auth.setAuth(accessToken);
    const { user, error } = await supabase.auth.api.getUser(accessToken);
    // user is non-null
    but when `console.log`ing the supabase client it seems like its
    auth.currentSession.user
    property is still
    null
    , will that prevent me from making authenticated api calls?
  • o

    omri

    04/28/2022, 1:15 PM
    i can just do this:
    Copy code
    ts
    supabase.auth.setAuth(accessToken);
    const { user, error } = await supabase.auth.api.getUser(accessToken);
    const session = supabase.auth.session();
    if (session) {
      session.user = user;
    }
    console.log(supabase);
    then the
    auth.currentSession.user
    property shows up just fine. should i be doing this?
  • g

    gehrig

    04/28/2022, 9:37 PM
    Is there an easy way to decrement an existing column in a row? Not sure how to best do a basic counter.
    g
    • 2
    • 8
  • k

    kaaloo

    04/29/2022, 10:19 AM
    Hi all, I would like to test auth by magic link locally but my local supabase (running using supbase start) doesn't seem to be sending out the email. The user is being created in the database though. Any thoughts? Thanks!
  • v

    Vidski

    04/29/2022, 12:38 PM
    SMTP configured correctly?
  • k

    kaaloo

    04/29/2022, 12:47 PM
    Hmm probably not. Could you please point out where I can find documentation for setting the SMTP server? I'm also missing some parts of the studio UI when running locally, maybe this is the root cause.
  • v

    Vidski

    04/29/2022, 12:51 PM
    > GOTRUE_SMTP_HOST: ${SMTP_HOST} > GOTRUE_SMTP_PORT: ${SMTP_PORT} > GOTRUE_SMTP_USER: ${SMTP_USER} > GOTRUE_SMTP_PASS: ${SMTP_PASS}
  • v

    Vidski

    04/29/2022, 12:52 PM
    Its not the root cause, most of the studio UI is licensed and not available to the public
  • v

    Vidski

    04/29/2022, 12:52 PM
    you can access all settings via. the docker-compose file
  • k

    kaaloo

    04/29/2022, 12:59 PM
    Thank you so much!
  • l

    Lucas T

    04/29/2022, 2:47 PM
    How do I get the user to be saved between sessions?
  • k

    kaaloo

    04/30/2022, 8:09 AM
    Oh you know what, I wasn't able to get that to work, I'm using the supabase cli to start supabase. However I discovered the local inbucket UI: http://localhost:54324/monitor
1...596061...81Latest