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

    React noob

    08/08/2022, 6:23 PM
    Copy code
    ts
      const submit = async (_data: Props) => {
            const {user,error} = await supabase.auth.signIn({
                email: _data.email
            })
            if(user){
                console.log('ok')
            }
            if(error){
                console.log(error.message);
                
            }
        }
    why log "ok" do not work but i can see the user in the auth.users ? i wan't do more it if pass like redirect on a new page or display a message
    n
    • 2
    • 1
  • g

    gesusc

    08/08/2022, 6:45 PM
    Is it possible to be notified via a realtime subscription when a user loses permissions (via RLS) on a row? It doesn't currently notify my listener but I was wondering if that was possible now or would be possible in the future.
    n
    g
    +2
    • 5
    • 16
  • g

    gorbypark

    08/08/2022, 7:27 PM
    I am trying to use an edge function to create a Stripe payment intent. Running the functional locally (
    supabase functions serve checkout
    ) works perfectly fine and I get the expected response from the Stripe server. Deploying the function gives me an error in the supabase logs of
    Uncaught SyntaxError: Identifier 'delay' has already been declared
    . Any ideas? Is supabase functions serve using a different version of deno than deployed versions, possibly?
    n
    • 2
    • 5
  • t

    Twisted Chaz

    08/08/2022, 7:42 PM
    Anyone know how to run this query from the JS sdk?
    Copy code
    sql
    SELECT users.firstname, ratings.rating
    FROM ratings
      JOIN users ON users.id = ratings.user_id
    WHERE album_id = 4
    ORDER BY users.firstname ASC;
    n
    g
    +2
    • 5
    • 13
  • b

    bennyp

    08/08/2022, 7:56 PM
    Hi Supabase team - great work! I come from the Oracle DB world and am a big fan of this project.
    n
    o
    • 3
    • 9
  • n

    NicoNico

    08/08/2022, 8:25 PM
    Hey! I was curious what the best way to enable read-only access to data would be in a NextJS app. Is there a way to just use the public client key and change something in the Roles? Or do I need to set up API routes and keep the API key server side? There's no users in this application, all the data can be publicly read, I just want to prevent users from taking the key and initiating writes.
    n
    • 2
    • 3
  • r

    React noob

    08/08/2022, 10:37 PM
    hey i try to delete this function
    Copy code
    sql
    DROP TRIGGER handle_new_user IF EXISTS on auth.users.created `
    but i get this error ``Failed to run sql query: cross-database references are not implemented: "auth.users.created"``
    Copy code
    sql
    -- inserts a row into public.users
    create function public.handle_new_user() 
    returns trigger 
    language plpgsql 
    security definer set search_path = public
    as $$
    begin
      insert into public.profiles (id,username)
      values (new.id,'John Doe');
      return new;
    end;
    $$;
    
    -- trigger the function every time a user is created
    
    create trigger on_auth_user_created
      after insert on auth.users
      for each row execute procedure public.handle_new_user();
    it is the new i want replace it
    n
    d
    g
    • 4
    • 17
  • p

    Profilüfter

    08/08/2022, 11:21 PM
    Has there been any news on when Supabase Realtime will have support for views?
    n
    g
    • 3
    • 4
  • a

    aggmoulik

    08/09/2022, 7:06 AM
    @jonny Hey, I was looking into the issues and I think the documentation and old PRs are not yet resolved yet ? What is the roadmap for the ui repo ? Are we continuing somewhere else ? https://github.com/supabase/ui Also, I have commented on some old issues but didn't get much response on that.
    n
    s
    • 3
    • 3
  • s

    sbr

    08/09/2022, 8:13 AM
    Hey @Kang Ming , is there an update on when https://github.com/supabase/gotrue/pull/414 will be merged? Twitter Auth is breaking for us and is a blocker for release
    n
    s
    • 3
    • 2
  • t

    thsko

    08/09/2022, 8:38 AM
    I'm trying to query a table and filter the data using a column and I get this error:
    could not find array type for data type character varying[]
    Here's the query:
    supabase.from("CandidateProfiles").select("*").in("job_types", ["Full-time"])
    job_types
    in my database is an
    array
    of
    varchar
    . Thank you!! 🙏
    n
    g
    • 3
    • 7
  • g

    gorbypark

    08/09/2022, 11:39 AM
    Not sure if i'm missing it in the docs (I probably am), but how can I trigger an edge function on every insert to a table?
    n
    u
    • 3
    • 5
  • k

    Kurooo

    08/09/2022, 1:54 PM
    do you guys know when they are going to make a Java dependency?
    n
    g
    • 3
    • 4
  • c

    Cheqo

    08/09/2022, 4:23 PM
    Hi everyone, I have a question regarding image optimization (resize profile picture thumbnails to 100x100). I know that supabase storage hasn't got
    resize-images
    yet, so I thought of doing this, can you tell me if thats a good solution for now? I would create a lambda function that users
    sharp
    image resizing library:
    Copy code
    1. convert image to base64 string and pass it to my lambda function
    2. lambda compresses the image and returns base64string
    3. I convert the returned base64 string into an image
    4. send the compressed image to supabase storage
    I know that there are some client side javascript libraries, but I don't think any of them are actually good when it comes to very small images, what do you think of this solution or is there something that would be better for my use case?
    n
    • 2
    • 1
  • h

    Huntedman

    08/09/2022, 6:55 PM
    Hey I have a RLS policy set on a storage INSERT operation. And then I have a custom signed JWT. The problem: Whenever I try to upload an image to this bucket, it fails with Invalid JWT. I have verified that the JWT is correctly signed (I can access restricted data in tables, etc). When I add "anon" to target roles, uploading will become allowed. 1) How does supabase determine whether the user is "authenticated" or "anon"? 2) What am I doing wrong? Thanks in advance.
    n
    g
    • 3
    • 3
  • r

    rankala

    08/09/2022, 9:38 PM
    hi, i upload my files with a path like this:
    Copy code
    ts
    const filePath = `${date.getFullYear()}/${date.getMonth()}/${uuid()}.${file.fileObj.name.split('.').pop()}`
    in another part, i want a list of all files of path's in a bucket. my guess, I need to do this:
    Copy code
    ts
    const {data: files, error} = await supabase.storage.from('bucketid').list();
    But here, i only get an id and a name, but not the full path. i am missing the year and month.
    n
    g
    • 3
    • 4
  • 🆕 garyaustin (2022-08-09)
    n

    Needle

    08/09/2022, 10:54 PM
    Hello @garyaustin! 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.
  • c

    caseycrogers

    08/10/2022, 2:05 AM
    Does anyone know why the following isn't working? I'm trying to order first by
    some_bool
    (trues first, then falses)\. I'm using
    flutter_supabase: 1.0.0-dev.3
    . The ordering I'm getting back seems arbitrary.
    await supabase.from('some_table').select().order('some_bool');
    n
    g
    • 3
    • 7
  • u

    49Ryann

    08/10/2022, 3:51 AM
    Has anyone created an integration with Twilio Conversations before, using Supabase?
    n
    • 2
    • 1
  • a

    Ape R Us

    08/10/2022, 6:57 AM
    question about name conventions. is it okay to name a function like this const New_Attendee = () => {} or should it be like newAttendee or new_Attendee personally New_Attendee seems more readable to me but i'd like to know what is the best practice
    n
    r
    • 3
    • 2
  • b

    benjaminbialy

    08/10/2022, 8:35 AM
    Hey everyone, my Supabase Edge Functions have started failing all of a sudden, they were working yesterday. I'm getting this error 502: Bad Gateway (DEPLOYMENT_FAILED) The deployment failed while serving the request
    n
    • 2
    • 1
  • v

    VuNguyen

    08/10/2022, 9:18 AM
    Why my database's daily disk always full? tried restarting but no help
    n
    d
    o
    • 4
    • 14
  • e

    e.sh

    08/10/2022, 10:35 AM
    Can someone help me with this: https://stackoverflow.com/questions/73304103/get-profile-information-from-linkedin-api-using-supabase , How do I get the access_token that linkedin provides? is it saved somewhere on my session...? Can someone help me?
    n
    m
    • 3
    • 6
  • a

    Anoushk

    08/10/2022, 12:14 PM
    in oauth sign in to redirect to a dyanmic url with url params is it required that the domain of that url be in the site url of the supabase app because we have two frontends using the same supabase app and this works on the firs frontend where the domain is the site url but on the second it doesnt
    n
    o
    • 3
    • 5
  • u

    49Ryann

    08/10/2022, 12:37 PM
    Is there an easy way to add a user_id field to an insert before it hits the policy checks? Id like to add a user_id and organisation_id to objects entering te database from the logged in user rather then the client which seems like a security risk.
    n
    g
    • 3
    • 12
  • d

    DesertRodent

    08/10/2022, 1:01 PM
    Hi Supabaser's I am loving Supabase and using it for my next website project! One thing that i wanted to know however is: Is there a way for me to restrict login to only specific users (e.g. admin users in backend, and clients in frontend)
    n
    o
    • 3
    • 17
  • b

    boeledi

    08/10/2022, 1:02 PM
    Hi, I am experiencing errors when I try to deploy an Edge Function
    Copy code
    supabase functions deploy hello-world
    Bundling hello-world
    Error: Failed to create a new Function on the Supabase project: {"id":"fe576b3d-3592-4efd-abe7-fbdde8c46a95","slug":"hello-world","name":"hello-world","version":1,"status":"ACTIVE","created_at":1660136284125,"updated_at":1660136284125,"verify_jwt":true}
    When I have a look at the Dashboard, the Function is there but when I try to invoke it I receive
    Copy code
    502: Bad Gateway (DEPLOYMENT_FAILED)
    
    The deployment failed while serving the request.
    Would you have an idea what I am doing wrong? Thanks
    n
    s
    g
    • 4
    • 4
  • s

    sidharth28

    08/10/2022, 1:02 PM
    Hi I want to view metrics and log of my platform , like given in this URL : https://supabase.com/docs/guides/platform/metrics gettind error: zsh: no such file or directory: https://.supabase.co/customer/v1/privileged/metrics
    n
    • 2
    • 2
  • s

    sidharth28

    08/10/2022, 1:07 PM
    Hi I want to view metrics and log of my platform , like given in this URL : https://supabase.com/docs/guides/platform/metrics gettind error: zsh: no such file or directory: https://.supabase.co/customer/v1/privileged/metrics
    n
    • 2
    • 1
  • p

    paddyfink | Pesabooks

    08/10/2022, 1:43 PM
    Hello, come here to report the same issue with my edge function:
    Copy code
    502: Bad Gateway (DEPLOYMENT_FAILED)
    The deployment failed while serving the request.
    n
    s
    +3
    • 6
    • 8
1...312313314315316Latest