https://supabase.com/ logo
Join Discord
Powered by
# help
  • joshcowan25 (2022-06-25)
    n

    Needle

    06/25/2022, 7:57 PM
    Hello @joshcowan25! This thread has been automatically created from your message in #843999948717555735 a few seconds ago. We have already mentioned the @User so that they can see your message and help you as soon as possible! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates. Want to change the title? Use the ``/title`` command! We have solved your problem? Click the button below to archive it.
    • 1
    • 1
  • b

    BigDoofus

    06/25/2022, 11:27 PM
    When I upload an imagine, I have my policies as public currently. But when I'm logged in, it seems like my URL to the image loses it access after 1 minute. Why is this so even though my policy is public?
    Copy code
    const imagePath = `${userUUID.data.id}/${fileUUID}`
    
              const saveImage = await supabase.storage
              .from('editorjsimages')
              .upload(imagePath, file, { upsert: true })
              
              const retrieveImageURL = await supabase.storage
              .from('editorjsimages')
              .createSignedUrl(imagePath, 60)
    n
    g
    • 3
    • 14
  • l

    lopezjurip

    06/26/2022, 12:39 AM
    I'm having an issue when signing with Github: Provider is not enabled
    n
    g
    • 3
    • 2
  • g

    gerry

    06/26/2022, 2:44 AM
    is it possible to manually insert users into the supabase users table?
    n
    j
    • 3
    • 6
  • i

    imousart

    06/26/2022, 3:31 AM
    can i connect supabase with bravostudio.app ?
    n
    • 2
    • 4
  • t

    timeforpoptarts

    06/26/2022, 4:10 AM
    I am having an issue inserting into a table with row level security. I understand why this is issue, but trying to figure out a workaround.
    Copy code
    const { error } = await supabaseClient
          .from('todos')
          .insert(data, {
            returning: 'minimal'
          });
    The policy I am using is below:
    Copy code
    create policy "Enable users to manage todos." on public.todos
      for all using (auth.uid() in (select user_id from public.todo_users where public.todos.id = public.todo_users.todo_id))
      with check (auth.uid() in (select user_id from public.todo_users where public.todos.id = public.todo_users.todo_id));
    I went down route of adding a trigger on insert to immediately add the user into todo_users but didn't seem to work (or I didn't do it correctly).
    Copy code
    create function public.handle_new_todo()
    returns trigger as $$
    begin
      insert into public.todo_users(todo_id, user_id)
      values (new.id, auth.uid());
      return new;
    end;
    $$ language plpgsql security definer;
    
    create trigger on_todo_created
      after insert on public.todos
      for each row execute procedure public.handle_new_todo();
    n
    s
    • 3
    • 12
  • b

    battlesheep123

    06/26/2022, 10:33 AM
    How would you do complex backend / business logic with Supabase? I mean, if you need more than just a simple select? Would you rather create a separate backend? Or would you use Edge Functions?
    n
    e
    • 3
    • 9
  • g

    GeorgeB

    06/26/2022, 11:04 AM
    I'm struggling to setup an external auth provider such as Google. I've tried Github as well and on both I keep getting unsupported provider. I'm doing this under the Next.js framework and am using valid oauth2 keys from both providers and have enabled it in the dashboard.
    n
    s
    • 3
    • 2
  • e

    e0

    06/26/2022, 11:29 AM
    @silentworks Sorry for tagging you directly and please don't stress about responding. I saw that you mentioned that you use postgres.js. Do you ever use postgres.js with RLS and auth? I imagine I would pass the user ID from the session but haven't validated it yet. Also wondering if you have some pattern that's more ergonomic.
    n
    s
    • 3
    • 6
  • s

    s c a p e g o a t

    06/26/2022, 7:32 PM
    What if I want to use RLS but do not want to use any of the authentication system provided by Supabase? I don't want to bother with storing users email addresses in my database, so it's going to be a very simple process. I have a very simple authentication system which will store a bcrypt-hashed password in a table. In which, the user will have to provide the correct password in order to modify the row that they own inside the table. Is it possible to call a function (which will run a JS script) within RLS checks to make sure if the password and the hashed password stored in the database is matched before allowing update/delete access? This way, I can make sure that I can use the
    anon
    key almost exclusively just like you would when using supabase's built in auth systems. The way I handle this currently is by comparing the password and the hash server side but this means I have to use the secret key to obtain the hash to my server. I would like to avoid this since it means I have to potentially expose my secret key to Vite (SvelteKit) and eventually to the client.
    n
    g
    • 3
    • 15
  • g

    giorgio

    06/26/2022, 7:57 PM
    Failed to run sql query: invalid input syntax for type uuid: ""
    This issue is supposed to be fixed in https://github.com/supabase/supabase/issues/6971 But it's not for me. Getting this while trying to view data of a foreign key in the row insertion modal
    n
    g
    • 3
    • 6
  • c

    ConnorThompson

    06/27/2022, 12:58 AM
    Weird One, I've been using Edge Functions for a few weeks now and they've been working great. However, I edited a small part of one of them today (just a string literal) and on redeploy I'm getting a 502 error. Tried redeploying another function I didn't change at all. Same 502 error after re-deploy. Reverted to previous known working code + redeployed -- 502 error. Not sure what's going on. Functions I haven't redeployed appear to be working fine. Get the below error message when testing via Curl.
    Copy code
    502: Bad Gateway (DEPLOYMENT_FAILED)
    
    The deployment failed while serving the request.
    I saw a few things on Github that this could be related to script memory / size limits,
    deno compile ./myScript
    produces an output file that is ~80MB in size, but again, this same script was working just a week ago. In Supabase GUI, there are no Logs present (even the one that should be printed on init), but I do see the Invocations. Any thoughts?
    n
    g
    • 3
    • 9
  • a

    aa

    06/27/2022, 4:23 AM
    The supabase vercel integration adds the
    NEXT_PUBLIC_SUPABASE_URL
    NEXT_PUBLIC_SUPABASE_ANON_KEY
    and
    SUPABASE_SERVICE_ROLE_KEY
    env vars. I am looking to get direct access (via the postgres client) to the database. I have been using the supabase connection string for this up until now but I'd like to automate it for my customers via the supabase integration. Is it possible to get the integration to provide the database connection string somehow? Or to get the connection string via the Supabase API?
    n
    s
    • 3
    • 3
  • s

    Slen

    06/27/2022, 5:07 AM
    My supabase app has google auth enabled and all the info is filled in but whenever i login using the JavaScript SDK i get an error sawing that google auth hasnt been enabled (and yes i saved the info) Error
    Copy code
    {
      "code": 400,
      "msg": "Unsupported provider: Provider is not enabled"
    }
    My code:
    Copy code
    async function googleLogin(){
            const { user, session, error } = await supabase.auth.signIn({
                // provider can be 'github', 'google', 'gitlab', and more
                provider: 'google'
            })
        }
    n
    s
    c
    • 4
    • 17
  • p

    Prashant Singh

    06/27/2022, 6:37 AM
    Same issue as @Slen https://refrikdvbtkhrnenntkc.supabase.co/auth/v1/authorize?provider=google returning: { "code": 400, "msg": "Unsupported provider: Provider is not enabled" }
    n
    s
    • 3
    • 4
  • r

    Ricc

    06/27/2022, 8:23 AM
    Is there a status code list?
    n
    s
    • 3
    • 2
  • c

    ChrisPBacon

    06/27/2022, 8:42 AM
    Is there a way of updating a row in a table using the current values of that specific row in one query? For example I want to update
    attempts
    by +1 of its current value:
    Copy code
    let {data, error} = await supabase.from("table").update({attempts: attempts + 1}).eq("email", email);
    Or do I first have to fetch the data in one query and then update it with a second?
    n
    s
    • 3
    • 2
  • g

    giorgio

    06/27/2022, 9:02 AM
    Is there a way to add multiple values from another table to a cell? I see that we can't add an array of foreign keys, but is there a workaround?
    n
    g
    • 3
    • 2
  • t

    tjsdavies

    06/27/2022, 9:26 AM
    Hi i'm struggling with something, I have set the Site URL but if i go into users > Send password recovery the redirect link in the email still points to '&redirect_to=http://localhost:3000'. The odd thing is in my other project it works fine. Am i missing something ?
    n
    s
    • 3
    • 18
  • s

    satya

    06/27/2022, 9:29 AM
    @User I am getting sorry, you have been blocked error from cloudflare
    n
    s
    • 3
    • 16
  • c

    CornusAmmonis

    06/27/2022, 9:51 AM
    I'm suddenly getting CORS errors from supabase when sending updates/inserts through the API. no code or DB config changes on our end. is there an outage of some kind?
    n
    s
    • 3
    • 2
  • l

    LEGEND

    06/27/2022, 11:34 AM
    hello
    n
    s
    g
    • 4
    • 46
  • d

    diegoalzate

    06/27/2022, 1:48 PM
    Hi can i refresh my api keys ? i kinda commited them to github 😦
    n
    b
    • 3
    • 7
  • m

    Martin INDIE MAKERS

    06/27/2022, 2:10 PM
    My Egde function who use Stripe SDK, stopped to work without changes in prod ! :/
    n
    g
    • 3
    • 4
  • a

    ani

    06/27/2022, 4:11 PM
    is there a recommended way to migrate data from firebase firestore and storage over to supabase?
    n
    • 2
    • 1
  • v

    VM

    06/27/2022, 4:19 PM
    hey, launched a site and we're using supabase (which we love). was wondering if there was any way we could hire (on a freelance level) someone from supabase to take a look at our setup and ensure everything is secure?
    n
    o
    +2
    • 5
    • 12
  • j

    jar

    06/27/2022, 6:24 PM
    Would like to call api and use that json to insert row on table. Would like to have function run on interval. Can you call apis from plpgsql? Can you run function on interval in supabase? I am familiar with the ability to seperately make a lambda function in my aws account that I can call apis and also could use supabase js to insert rows and call that lambda on interval. I know there are these new edge functions and just plpgsql funcs or lambda that I am familiar with. Any suggestions on way to go? Thanks
    n
    g
    • 3
    • 35
  • s

    snoodleking

    06/27/2022, 8:22 PM
    i get this
    <title>Temporarily unavailable | *db-endpoint-here*.supabase.co | Cloudflare</title></title>
    error page intermittently on DB reads. Is this a known thing?
    n
    g
    • 3
    • 3
  • j

    jvocodes

    06/27/2022, 9:44 PM
    Hi everyone - I'm still struggling with some elements of auth with Supabase. I'm probably missing something or just not understanding something. I have successfully set up sign up and sign in on my Express server. However, I cannot figure out how to persist the user in my app. Currently, if I sign up/sign in then everything is fine, but if I refresh the app, the user goes away. This makes sense because I'm storing the user data using React Context, but I can't figure out how to check if a user is signed in and then get that information back to my Context. I hope that made sense, but can anyone help/explain this to me?
    n
    l
    c
    • 4
    • 7
  • g

    ggggguh

    06/27/2022, 9:54 PM
    hi everyone - im trying to write a policy to enable only the current row inserted to be returned. any suggestions?
    n
    g
    • 3
    • 32
1...291292293...316Latest