https://supabase.com/ logo
Join Discord
Powered by
# help-and-questions
  • sign in with email and OTP
    f

    fred kufner

    05/10/2023, 5:52 PM
    I have magic link working fine. email send link and user can log in. I would like to alternatively send them a code. I see this: https://supabase.com/docs/reference/javascript/auth-signinwithotp I am using vue and signInWithOtp is not available in the client. What am I missing?
    s
    • 2
    • 1
  • Generate signed url from a storage bucket using Curl request?
    h

    hemantgangolia

    05/10/2023, 5:56 PM
    I'm trying to generate a signed url using a Curl request and getting 401 error. Which API key is to be used - anon or service role for setting up in Auth header? Thanks
    g
    • 2
    • 2
  • can i get authenticated user before redirect when using SignInWithOAuth() ?
    c

    crimsen

    05/10/2023, 5:57 PM
    `const { error } = await createSupabaseClient.auth.signInWithOAuth({ provider:
    ${provider}
    , options: { redirectTo:
    ${process.env.NEXT_PUBLIC_APP_URL}/auth/dashboard
    , }, });`
    s
    • 2
    • 1
  • Key is not present, but is present
    o

    Olly

    05/10/2023, 6:25 PM
    I have a weir problem where it throws an error everytime complaining about key not being present in table, but it is in there, code is 23503
  • return HTML
    m

    Martyn Shiner

    05/10/2023, 6:28 PM
    Complete newbie question… can a request to supabase return HTML rather than json?
    g
    v
    • 3
    • 4
  • I am trying to get data from my database
    s

    seeinplays

    05/10/2023, 7:28 PM
    But it's not showing any information when I try to query it.
    Copy code
    let { data: user, error } = await supabase
      .from('user')
      .select('address')
    I have the client set up like this
    Copy code
    let { data: user, error } = await supabase
      .from('user')
      .select('address')
    is there something I'm missing?
    g
    v
    • 3
    • 15
  • Insert() function does not response anything
    o

    osamita

    05/10/2023, 7:31 PM
    This problem has occurred in several occasions. I do a simple insert, like this let { data, error } = await supabase.from("devices").insert([ { id_machine: device_data.id_machine, auth_id: user.auth_id, brand_id: device_data.brand_id, model_id: device_data.model_id, operating_system_id: device_data.os_id, os_version_id: device_data.os_version_id, }, ]); (real case) In the database the row is inserted correctly, but supabase answer is: { count : null, data : null, error : null, status : 201, statusText : "" }
    s
    • 2
    • 2
  • Authentication url configuration for subdirectory
    b

    bboy

    05/10/2023, 7:49 PM
    Hi there I'm pretty new to supabase and coding alltogether so forgive me please for my perhaps stupid question. I built an app and put it on my server now. The app is in a subdirectory (https://my-website.com/app). I configured the site url to this exact adress. However, when I create a new account and click the confirmation link, it sends me just to https://my-website.com where of course there is no auth listener that could handle the token. Can anybody help me with that?
  • SupaBase SvelteKit, resetPasswordForEmail() sends an email with a link...
    r

    Rodrigo702

    05/10/2023, 7:56 PM
    I want the link sent in the email to be a one time use link, I would also like the reset-password page to only be accessible from the one-time link. I know there are tokens that can be added to the link like {{.Token}} or {{.TokenHash}} but I cant figure out how to use them. Any help would be appreciated 🙏

    https://cdn.discordapp.com/attachments/1105946595972890734/1105946596161638500/Screenshot_2023-05-10_at_12.49.30_PM.png▾

  • PKCE with OAuth
    v

    vortexbam

    05/10/2023, 7:59 PM
    I am using the Supabase-py client library in a Flask Server. I have gotten the Auth and Callback to work. However, I am stuck with getting the access_token in the callback (flask API) Now, I understand PKCE is the way to go for this since tokens can’t be passed to the server as query params There isn’t any legitimate documentation on using PKCE with oauth signin in supabase-py. Please help 🙂
    g
    s
    • 3
    • 4
  • ERROR: must be owner of event trigger pgsodium_trg_mask_update
    g

    Goldin

    05/10/2023, 8:25 PM
    I have been trying to run migrations using prisma, but I keep hitting this error ERROR: must be owner of event trigger pgsodium_trg_mask_update because I use the postgres user. I have the same error when I try to make the changes on the supabase dashboard and everywhere else. How else am I supposed to run migrations to my db?
    s
    r
    • 3
    • 7
  • How do I use `supabase.functions.invoke`?
    r

    root

    05/10/2023, 9:03 PM
    I'm trying to send some data, but it's giving an "Unexpected end of JSON input" error. I'm using it like this:
    Copy code
    ts
    (await supabase.functions.invoke('get-user', { body: JSON.stringify({ uid }) })).data
    Sending the same request with Postman works properly.
    g
    • 2
    • 8
  • Where is this auth UI theme customizer
    d

    dfasdfghadfhg

    05/10/2023, 9:16 PM
    Pleaseeeee hhah seems really usefull
    s
    z
    • 3
    • 13
  • Help me (and 3 other devs) contribute to Supabase!
    m

    mkarmstr

    05/10/2023, 9:17 PM
    We have a few weeks to build something of use to the Supabase community, whether it be - building a standalone tool (visualization, migration, monitoring, etc) - working on a feature or - solving an issue the community has been encountering. Hope to hear from any of you, including the team, about what you want to see. 🤞
  • supabase client with vault schema
    a

    amitmirgal

    05/10/2023, 11:08 PM
    is there anyway i can insert secrets in vault via supabase client. I can do it manually as per our docs but trying via programming for instance
    Copy code
    js
    import { createClient } from "@supabase/supabase-js";
    
    async function addSecrets() {
    
      const supabaseClient = createClient(
        "url",
        "service_role",
        {
          db: {
            // vault schema is not support. 
            // only supported schema are public, storage, graphql I think
            schema: "vault"  
          }
        }
      );
    
      await supabaseClient.from("vault.secrets").insert({
        secret: 's3kr3t_k3y',
        associated: 'This is the secret API service key.'
      });
    }
    
    addSecrets()
    v
    • 2
    • 1
  • Sharing TypeScript files between Edge Functions and other code
    g

    gilbert

    05/10/2023, 11:25 PM
    I have a
    github.ts
    file that is shared across my codebase. I'd like to use this file for an edge function too. However, the local edge functions runtime cannot find this file. The import looks like this:
    Copy code
    import { getRepo } from "../../../shared/github.ts";
    Looking at the debug output shows why it fails:
    Copy code
    DEBUG FileFetcher::fetch() - specifier: file:///home/deno/functions/_lib/edge-db.ts
    DEBUG FileFetcher::fetch() - specifier: file:///home/shared/github.ts
    Is there a way to import code outside the
    supabase/functions
    folder? I tried a symlink but it didn't work. Thanks
    v
    b
    +3
    • 6
    • 51
  • TensorFlow in Supabase Edge Functions
    s

    SunTzu

    05/10/2023, 11:32 PM
    Hi, I've tried to get tensorflow within Supabase Edge Functions to work. Specifically within the Langchain TensorFlow Embedding. Has anybody tried this or considered this at all and have an idea?
    g
    • 2
    • 2
  • Supabase migration file fails to namespace, fails on the CLI
    j

    Julian IncrEdelman

    05/10/2023, 11:54 PM
    This is particularly annoying because I'll get the "too many db clients" on the CLI so will run
    supabase stop --backup
    and then
    supabase start
    . My migration file (which CAME from the local DB and was run properly in prod) fails with a ton of errors basically because I need to include "public." or "extensions". That is issue #1. Issue #2 is after I fix them and run
    supabase start
    my backed up data is GONE. So now I am just screwed. Ugh.
  • storage custom metadata
    r

    Robert Dylina

    05/10/2023, 11:54 PM
    Good afternoon everyone, It appears you can't have custom metadata on storage objects. Any chance that this is a feature under development or on the roadmap? My use case is pretty simple and incredibly common. Captions for photos. Makes a whole heck of a lot of sense to be able to store the caption for a photo along with it in storage as opposed to maintaining a whole other table and having two sources of truth that can potentially get out of sync. Thank you!
    g
    • 2
    • 2
  • Question about Edge Runtime and Edge functions
    v

    ven

    05/11/2023, 12:18 AM
    Can someone in the community explain to me why in this official company video from Supabase you are recommended to open an account on fly.io to deploy your edge runtime? We wanted to mitigate our serverless cold-start and dealing with multiple vendors. One of the big selling points of Supabase for us that we get to deal with one vendor for our auth/postgres/edge-functions/realtime/storage needs. What explains this redirect?

    https://www.youtube.com/watch?v=cPGxPl1lx4Y▾

    o
    s
    • 3
    • 33
  • Unable to store base64 format for images in supabase storage
    t

    torpis

    05/11/2023, 1:16 AM
    I am sending images from appsmith to supabase. the API was working fine with 200 response but the thing is I am not able to view those images from the storage and when downloaded it shows like unsupported file format. when i am hitting the image url I can just see a small white box as shown below.

    https://cdn.discordapp.com/attachments/1106027123208101989/1106027123359088740/Screenshot_2023-05-10_201320.png▾

    https://cdn.discordapp.com/attachments/1106027123208101989/1106027123677872208/Screenshot_2023-05-10_201116.png▾

    g
    j
    • 3
    • 25
  • How to force create new access token?
    m

    Michael Li

    05/11/2023, 1:26 AM
    After
    raw_app_meta_data
    updated, how do i create new access token?
    g
    • 2
    • 1
  • TypeError when using Supabase PostgREST client with integer parameter
    g

    goodparson

    05/11/2023, 2:55 AM
    Hello everyone, I've recently encountered an issue when using the Supabase Python client to update a table in my database. Here is the relevant portion of my code:
    response = supabase.table("conversations").update({"rating": 5}).eq("id", 1).execute()
    The id field in my "conversations" table is an integer, and I am trying to update the "rating" field for the row with id = 1. However, when I run this code, I receive the following error:
    TypeError: argument of type 'int' is not iterable
    The error seems to originate from the sanitize_param method in the PostgREST client used by Supabase. I suspect this method is designed to ensure that certain reserved characters are not included in the parameters of the request, but it appears to be expecting all parameters to be iterable, leading to a TypeError when an integer is passed. Has anyone encountered this issue before or does anyone have suggestions on how to resolve this? I am following the Supabase documentation, so I'm not sure if this is a bug in the library or if there is something else I'm missing. Any help would be greatly appreciated! Thanks in advance!
    g
    • 2
    • 3
  • storage RLS, evaluating incoming request
    r

    Robert Dylina

    05/11/2023, 3:35 AM
    I am using UUIDs as buckets to store images. This UUID is used to check permission for the user and their organization. For updates it's easy to destructure the uuid from the existing folder/bucket structure. However, for the first insert we don't have a bucket yet. The supabase docs don't seem to indicate how to access the features of the incoming request. I just need to pull out the incoming requests folder/bucket/uuid to check against. Any thoughts?
    g
    • 2
    • 6
  • API not returning table entries.
    a

    AmanGotchu

    05/11/2023, 3:46 AM
    I'm calling a simple request and not getting entries that I can visibly see in the Supabase dashboard.
    Copy code
    export const supabase = createClient(
      process.env.SUPABASE_URL!,
      process.env.SUPABASE_ANON_KEY!
    );
    Copy code
    let response = await supabase.from("prompts").select("*");
    I don't get any errors from my response just an empty row of entries. I tested the client config by passing in both invalid urls and anon keys that both result in errors leading me to believe that my configuration is correct, but the response is incorrect..
    g
    • 2
    • 1
  • NextJS 13, browser/server clients and broken session
    u

    1voy

    05/11/2023, 4:04 AM
    I am working on a login for my project. I have a Auth context hook that I use to retrieve a user and set views (login, signup, forms,etc.). Currently, after an attempted login with Google I try to console.log my user and session and at first it does so but a couple times? and then console.log's nulls and loses the session, showing the sign in page again. I honestly really don't know what is wrong here at this point, would love some feedback as I know I am doing some terrible logic somewhere. Providing screenshots of my middlewares, AuthProvider components and hooks. The console is exactly what happens once I try to sign in with Google

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069243340005396/Screenshot_2023-05-10_at_11.37.10_PM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069243667173476/Screenshot_2023-05-10_at_11.44.05_PM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069243985924106/Screenshot_2023-05-10_at_11.45.16_PM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069244292112485/Screenshot_2023-05-10_at_11.47.14_PM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069244556365845/Screenshot_2023-05-10_at_11.47.22_PM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069244875116575/Screenshot_2023-05-10_at_11.47.41_PM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069245177110538/Screenshot_2023-05-11_at_12.03.39_AM.png▾

    https://cdn.discordapp.com/attachments/1106069243180617728/1106069245546221568/Screenshot_2023-05-11_at_12.03.57_AM.png▾

    • 1
    • 1
  • Uploading to public bucket results in 404
    k

    KBar

    05/11/2023, 6:39 AM
    I have a public bucket set up. At first, I was getting the
    new row violates row-level security policy for table "objects"
    error until I added policies for
    INSERT
    &
    DELETE
    . Now, uploads fail with a 404 status despite the fact that the bucket exists. Here's part of the code that handles the upload process:
    Copy code
    jsx
    if (img) {
      let { data, error } = await supabase.storage.from("public/images").upload(
        `${user.id}_${Date.now()}`,
        img
      );
      if (error) console.error(error);
      if (data) console.dir(data);
    }
    Responses have 400 status but the body contains the following JSON:
    Copy code
    json
    {"statusCode":"404","error":"Not found","message":"The resource was not found"}
    What's going on here?
    • 1
    • 1
  • Exceeding usage limits
    p

    Pontus Berglund

    05/11/2023, 7:17 AM
    I am working on a group project where we use supabase. Today we noticed we have excceded the storage egrees with a few gb, we are using the free plan. But the app still works and we can still get images from our supabase storage. What is actually happening when we exceed the usage limit?
    s
    • 2
    • 2
  • how to resize icon in oauth ui component?
    h

    hiroshi nishio

    05/11/2023, 8:03 AM
    how to resize icon in oauth ui component especially slack oauth sign in component icon??
    s
    • 2
    • 1
  • sveltekit & gen types
    a

    Ape R Us

    05/11/2023, 8:24 AM
    Has anyone been able to properly get types up and running from the cli? when i try to link the project and it ask for password, im unable to type and when i do get to i get this error
    Copy code
    host=db.***.supabase.co user=postgres database=postgres`: failed SASL auth (FATAL: SASL authentication failed (SQLSTATE 08P01))
    s
    • 2
    • 5
1...209210211...230Latest