https://supabase.com/ logo
Join Discord
Powered by
# help
  • l

    Lukas V

    07/19/2022, 7:36 PM
    Hello, I really want to know how would I migrate from firebase to supabase, auth specifically? Has anyone here done it, like what are my options at the moment?
    n
    g
    • 3
    • 2
  • z

    zavbala

    07/19/2022, 8:25 PM
    Hello, how can I achieve to get all rows with graphQL?
    n
    • 2
    • 2
  • j

    jar

    07/19/2022, 11:02 PM
    Why does my "Confirm Your Signup" email take like 7ish minutes to arrive. Is this some kind of dev speed its a cause for great confusion and paitents if continues
    n
    g
    • 3
    • 9
  • s

    Sajeev

    07/20/2022, 2:24 AM
    I can't get the request header of a rpc function
    n
    s
    • 3
    • 7
  • e

    Ethanxyz

    07/20/2022, 3:02 AM
    Hey everyone. I am currently trying to perform some logic on the following tables...
    reports
    bonds
    report_bonds
    report_bonds
    is a junction for
    reports
    and
    bonds
    and looks like.... id report_id
    ( FK )
    bond_id
    (FK)
    This allows me to create
    reports
    which hold a list of
    bonds
    . On my
    Reports.js
    page I want to delete some of the
    bonds
    from a
    report
    . To do this, I am doing something like...
    Copy code
    js
    
      const removeBondFromReport = async () => {
        const { data, error } = await supabase.from("report_bonds").delete().match({
          bond_id: selectedBonds[0],
          report_id: report.id
        });
    
        if (error) {
          alert(error.message);
          console.log(error.message);
        }
      };
    Issues.... 1. I get an error for FK restraint on my
    reports
    table, This is because the
    reports
    table has a FK for
    report_bonds
    id. 2. Notice how I say
    bond_id: selectedBonds[0],
    in my query ? Well, selected bonds is an array ( I have this connected to a MUI data grid which allows me to select rows and add them to an array ) Questions.... 1. How can I solve #1 2. Is there a way to perform this query using the whole`selectedBonds` array (e.g. deleting multiple rows at once ) ? Thank you for taking the time to read.
    n
    n
    g
    • 4
    • 8
  • s

    Sajeev

    07/20/2022, 3:15 AM
    I am having a problem with rpc function
    n
    • 2
    • 9
  • a

    AlanK

    07/20/2022, 6:14 AM
    Still trying to get Sign Up redirect to work with Sveltekit-auth-helper. The target route has a form with an endpoint to load the data. It seems that the withApiAuth function is causing the redirect to be redirected to the index route... Presumably because of a problem with the session cookie? If I remove the withApiAuth guard the page eventually loads, but then I don't have a protected route. I can think of few ways to work around this but I think I'm missing something obvious.
    Copy code
    export const GET = async ({ locals, request }) =>
        withApiAuth(
            {
                user: locals.user
            },
            async () => {
                const { data: profile, error } = await supabaseServerClient(request)
                    .from('profile')
                    .select('*')
                    .eq('id', locals.user.id);
                if (error) {
                    console.log('error Get Profile for Survey:', error);
                    return {
                        status: 400,
                        body: { error }
                    };
                    return {
                        status: 200,
                        body: { surveyData }
                    };
                }
                return {
                    status: 400,
                    body: {}
                };
            }
        );
    n
    s
    • 3
    • 4
  • a

    azel

    07/20/2022, 8:50 AM
    Hello, i could not access the supabase dashboard in my project. Stuck at connecting to project...
    n
    s
    • 3
    • 6
  • s

    Siddharth

    07/20/2022, 9:02 AM
    I have a table with rides information It has many columns like pick up, drop-off, passengers, driver, amount e.t.c I am using API to get filtered data, as
    n
    s
    • 3
    • 5
  • p

    PeteVanF

    07/20/2022, 9:37 AM
    Is there an issue in creating a new project at the moment? Tried either a free or paid project and am getting "Failed to create new project: Failed to insert project" no matter what region (all EU) or project name.
    n
    • 2
    • 2
  • k

    Kalo0m

    07/20/2022, 10:51 AM
    Hey guys! I have a front end developed with bubble (no-code) and I wanted to know if it was possible to get data from supabase ?
    n
    s
    s
    • 4
    • 3
  • a

    Amberon

    07/20/2022, 11:11 AM
    I can't enter the OTP, when i click on save after entering the card details in the card details pop up another pop up shows on top of that for OTP verification and it seems that it non usable. When i click around the screen the card details pop up closes in the background only then the OTP pop up let's me enter the code but the verification has already been cancelled since the payment details pop up is closed
    n
    s
    • 3
    • 3
  • j

    Jude

    07/20/2022, 1:10 PM
    Hello I'm very new to Supabase and I'm trying to reference a table, I did some research and I couldn't find any findings to it yet Basically I have a Bookmarks table that contains:
    Copy code
    title
    bookmarks: []
    Where I'll reference the Bookmark table
    n
    s
    • 3
    • 4
  • v

    vMInvincible

    07/20/2022, 2:01 PM
    Hey guys! I want to divide users in different groups so that each group can check there records only, moreover groups can add members to there group, I'm searching, but no luck till now !
    n
    g
    • 3
    • 46
  • k

    Kevin Mann

    07/20/2022, 2:04 PM
    Can you access tables on other schemes beyond public using edge functions.
    const { data, error }  = await supabase.from("schema.table").select();
    n
    s
    g
    • 4
    • 10
  • r

    React noob

    07/20/2022, 3:53 PM
    My key its well set up but i still have this errror
    n
    g
    • 3
    • 4
  • t

    Tater Of Tots

    07/20/2022, 6:38 PM
    Hey ya'll. I'm pretty new to writing sql and plpgsql stuff so hopefully this is an easy fix that I just don't know yet. So I'm making an sql snippet that adds a student to the
    students
    table and then the function also gets an array of phone numbers and I need to add them to the
    phones
    table with the
    new student_id
    . I have gotten far enough that it add the student and returns the id then puts the id in a variable. The part I'm stuck on is the syntax for taking this array of phone numbers and and adding a row for each number along with the
    student_id
    . Heres what I have so far
    Copy code
    create or replace function insert_student(
      first_name text,
      last_name text,
      grade text,
      dob date,
      phones phone_type[]
    )
    RETURNS setof students
    AS $$
    declare
      student_id int8;
      begin
        INSERT INTO students
        (first_name, last_name, grade, dob) values (first_name, last_name, grade, dob)
        returning id INTO student_id;
    
        INSERT INTO phones
        (phone_number, student_id) values
         (phones, student_id); --THIS IS THE PART I'M STUCK ON
    
        RETURN query select * from students where students.id = student_id;
      end;
    $$ language plpgsql;
    n
    s
    • 3
    • 7
  • r

    React noob

    07/20/2022, 7:32 PM
    Maybe i did something wrong i can't figure it out, when i send data it send multiple other data
    n
    s
    • 3
    • 5
  • z

    zavbala

    07/20/2022, 9:02 PM
    πŸ‘‹ is there a way to get all items on graphQL request?
    n
    g
    • 3
    • 3
  • r

    React noob

    07/20/2022, 11:23 PM
    column have multiple could take multiple image should i set define as an array or do a joins table ? if define as a array do we have se send the information like this
    Copy code
    js
     image_url: [dataKey]
    because error say "details": "Array value must start with \"{\" or dimension information." and i do don't get it
    n
    g
    • 3
    • 4
  • k

    Kolby

    07/21/2022, 1:40 AM
    Is it possible to batch download files? I'm not seeing anything about it on the docs
    n
    g
    • 3
    • 5
  • q

    quangtd.near

    07/21/2022, 2:44 AM
    Hi guys, I'm trying running a self-hosting with docker at my localhost, follow this guide: https://supabase.com/docs/guides/hosting/docker I keep all origin values in .env but when opening the url: localhost:3000/, it always hangs at this screen: anyone can help?
    n
    s
    • 3
    • 2
  • j

    jar

    07/21/2022, 4:54 AM
    I made person table that gets row on trigger of new auth user where i make field user_id for auth id and a auto generated uuid for person_id. (I guess thought maybe dont tie person id to auth id in case move account to diff auth user). Anyway for storage I am trying to create a crud policy but I dont believe you can do declare, begin, end I also have a person_roles table with person_id, role_id like 'admin' I have auth.uid in policy do i need to use that to get the person id and then check if there is a person_id, 'admin' row in person_roles How might I accomplish this?
    Copy code
    declare
      _person_id uuid;
    begin
      select id from public.persons where user_id = auth.uid()::text into _person_id;
      select 1 from public.person_roles where person_id = _person_id and role_id = 'admin';
    end;
    This is my not correct but gives idea of aim
    n
    g
    • 3
    • 4
  • πŸ†• jokun (2022-07-21)
    n

    Needle

    07/21/2022, 5:57 AM
    Hello @jokun! 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.
  • i

    InASunshineState

    07/21/2022, 6:41 AM
    Supabase is pretty amazing at databasey things, but I struggle a bit with common auth-like patterns even after the recent updates For example, many example repos are set up so that you stay on the same page you logged in on, but show different content once the user object is full. I'd like to identify the user server-side and redirect them to a different page/route on success. It seems that between Next.js and the updated Auth Helpers, this isn't a possible thing. getUserByCookie doesn't work and supabaseClient.auth.session() returns an access_token which, if nothing else, at least lets me know there's a real or non-logged-out person, to use as a conditional to force a redirect. But the redirects away to the destination implode, presumably because the destination page is guarded from logged-out users and redirects back to the same place they just came from -- as if the destination page didn't know who they were. I cannot find a simple, basic working example of this, and can find five or six GitHub threads talking about it or around it, so I feel like I'd just muddy the waters to add another one. Is there some inherent aspect to node/React/Next/Supabase that prevents it?
    n
    s
    • 3
    • 5
  • z

    zenny.eth

    07/21/2022, 7:25 AM
    Bug in prod but not local. I think it's related to this. How can you tell what version of postgrest is live in prod? https://github.com/PostgREST/postgrest/issues/2369
    n
    s
    • 3
    • 3
  • c

    Chiqui

    07/21/2022, 10:50 AM
    Good afternoon, i've deployed the project through Supabase, but it still "Connecting to Default Project"
    n
    s
    k
    • 4
    • 10
  • d

    derpwingduk

    07/21/2022, 12:20 PM
    Hi, I've been playing around with the supabase-custom-claims repo and I've run into a bit of a problem with request.jwt.claims
    n
    g
    +2
    • 5
    • 15
  • r

    RubensNobre

    07/21/2022, 12:47 PM
    Hey Folks... I'm facing RPC errors that I can't fix anyway... I alway get same response... {"message":"Could not find the public.ae_review1(template_id, value) function or the public.ae_review1 function with a single unnamed json or jsonb parameter in the schema cache","hint":"If a new function was created in the database with this name and parameters, try reloading the schema cache."}
    n
    g
    • 3
    • 19
  • r

    React noob

    07/21/2022, 12:59 PM
    Copy code
    sql
    create policy insert_as_admin ON storage.buckets.id = 'hiking-picture'::text for all using (
    (EXISTS ( SELECT 1
       FROM profiles
      WHERE ((profiles.admin IS TRUE) AND (profiles.id = 'b815-8e02-6c3f13e05026'::uuid))))
    );
    I have a syntax error ``Failed to validate sql query: syntax error at or near "="`` but i don't really see where it at
    n
    • 2
    • 2
1...304305306...316Latest