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

    gorbypark

    07/25/2022, 3:01 PM
    how can I get the user id of the user who invoked an edge function?
    n
    g
    • 3
    • 6
  • c

    caffeinum

    07/25/2022, 3:22 PM
    gm! supabase is down for us due to peak demand, how I can turn on "Pay As You Grow"?
    n
    g
    • 3
    • 6
  • a

    ashmit

    07/25/2022, 3:46 PM
    Can I access things from google cloud using Supabase like integrate both stuff somehow? I want to get some data from Google drive and do some stuff with it according to some user data that will be stored in supabase.
    n
    n
    • 3
    • 2
  • m

    mathewcst

    07/25/2022, 4:37 PM
    I want a RLS policy to limit users to see other users only if they share a space
    n
    g
    • 3
    • 12
  • r

    rlee128

    07/25/2022, 6:52 PM
    Can esm.sh be used to add any package thats available in node to use in Deno? This is to use with Edge Functions
    n
    • 2
    • 2
  • g

    gesusc

    07/25/2022, 7:54 PM
    Is there a good way to debug RLS policies? I have a very simple RLS policy on a
    profiles
    table (which I believe I lifted straight from the Supabase docs) that is preventing me from inserting into the table and I have no idea why. The
    profiles
    table has an
    id
    column for the primary key and the policy is below:
    Copy code
    create policy "Users can insert their own profile."
      on profiles for insert
      with check ( auth.uid() = id );
    When I run
    this.#supabase.from('profiles').insert()
    as an authenticated user I get
    new row violates row-level security policy for table \"profiles\"
    .
    n
    g
    • 3
    • 5
  • c

    chillydog

    07/25/2022, 8:19 PM
    Howdy! Trying to build a phone signup flow. Is it possible sign users up with phone and not phone + password?
    n
    • 2
    • 2
  • g

    Gianni

    07/25/2022, 8:53 PM
    I am asking myself if there is a possibility for RLS policies to exclude columns. Like a User could edit everything in his profile, except his UserRole Column, is there something like that possible ? Or is there a way to get the Data that should be inserted and check them ? Like if UserRole!=null -> Reject ?
    n
    g
    s
    • 4
    • 3
  • j

    Julien

    07/25/2022, 8:59 PM
    Hello guys, I'm struggling with a join request with filters. I have the following simplified database (see the picture). I have a playground table, a playground can have many contacts which can either be persons or organizations. A playground has one organization which created it. I want to be able to select playgrounds which: - have been created by my organization OR - have my organization in its contact list OR - have myself in its contact list But I can't find the request to select these playgrounds. I have tried many request among them the following one:
    Copy code
    ts
            return this.supabaseService.supabase
                .from('playground')
                .select(`
                    *,
                    playground_contact_person(
                        person
                    ),
                    playground_contact_organization(
                        organization
                    )
                `)
                .or(`creative_organization.eq.${this.userService.userOrganizationId}`)
                .or(`person.eq.${this.userService.userProfile.id}`, { foreignTable: "playground_contact_person"})
                .or(`organization.eq.${this.userService.userOrganizationId}`, { foreignTable: "playground_contact_organization"})
    But this doesn't give the expected result. I suppose that I'm doing a bad joining but also I think that I should only have one ``or`` statement? But if I should have only one ``or`` statement, how can I filter on multiple foreign table?
    n
    g
    • 3
    • 8
  • 🆕 nickbook777 (2022-07-26)
    n

    Needle

    07/26/2022, 12:31 AM
    Hello @nickbook777! 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.
  • n

    nickbook777

    07/26/2022, 12:38 AM
    Supabase seems to be experiencing technical problems related to cloudflare. Any info on what's going on? Our business is being affected significantly.
    n
    s
    • 3
    • 2
  • f

    FestiveLlama

    07/26/2022, 1:44 AM
    Just a thought - is there a way to clone a supabase database? For example, I have one set up for dev but now want a separate one for prod. Is there a way to quickly migrate dev settings into prod? and vice versa?
    n
    j
    • 3
    • 3
  • lennard. (2022-07-26)
    n

    Needle

    07/26/2022, 7:37 AM
    Hello @lennard.! 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.
    j
    • 2
    • 1
  • k

    knajjars

    07/26/2022, 7:47 AM
    Is
    console.log
    console.warn
    console.error
    and
    console.info
    supposed to work with suapabase functions? logs from methods other than
    console.log
    do not seem to be visible in the functions logs in supabase
    n
    j
    • 3
    • 3
  • w

    Waldemar

    07/26/2022, 8:38 AM
    A have a fundamental (noob...?) question regarding using Supabase Auth / RLS with SvelteKit in **SSG **(Static Site Generation) mode, deploying to Vercel. (https://kit.svelte.dev/docs/appendix#ssg) Our new SvelteKit project will have three types of pages: - Purely static content (blog posts etc.) - Mainly static content, but some interactivity for "anon" visitors (e.g. quote calculation form) - Dashboards (accounts) for authenticated users (vendors, clients, admins) SEO is hugely important to us, so I want the pages with static content to be super fast. Also we only update content every two weeks. So I plan to use SvelteKit SSG and host our website/app on Vercel. I've spent a few days messing around with Supabase Auth, RLS, SvelteKit hooks, $session, Page Endpoints,
    load
    function (which I've read will be deprecated). I like the SvelteKit Page Endpoints idea and from what I understood they run server-side and will also work with Vercel, which converts them to Serverless Functions. Questions: 1) For my config / deployment / hosting scenario, can I just use Supabase Auth (with RLS) in Page Endpoints (or any Endpoints), or do I need something like the auth-helper for SvelteKit (thanks for @silentworks for mentioning it), to pass on the user auth data / session to the "server-side" (endpoints), where the Supabase JS client will fetch data from the DB? 2) If I want to avoid using any additional utils / packages like this auth-helper, or coding something around auth in SvelteKit (hooks, session etc.) at all, and want to use Supabase JS client "out of the box", what are my options? Only to use it client-side (e.g. in
    onMount
    ...)? Naturally UX and security are most important to me, so if I need to do some extra coding, that's not a problem, but I want to understand this whole shebang and add/code only what is really necessary for our project. Any guidance on the above will be greatly appreciated!
    n
    s
    • 3
    • 4
  • e

    Evjen

    07/26/2022, 11:00 AM
    Hey! I have a situation where my function behaves differently from Insomnia (HTTP Client) and when I use .rpc() from Supabase Client. Insomnia response is excactly as expected, where it returns one row that fits the filters passed in consistently. Supabase client responds with rows that does not fit the filters.
    n
    s
    • 3
    • 7
  • r

    renderlux

    07/26/2022, 12:26 PM
    When I run Supabase it does not come with login or user sign up, Do I have to build one ?
    n
    g
    • 3
    • 7
  • r

    React noob

    07/26/2022, 12:48 PM
    If i have a list a product of things with image url that was store in storage i have to find a way to call ``await supabase.storage.from('image').download(path)`` every time and create a ``URL.createObjectURL(data)`` or their is a way to upload the image and when it fetch and pass to `` it read like other api do.
    n
    g
    • 3
    • 6
  • t

    tubbo

    07/26/2022, 2:52 PM
    hey folks, loving supabase so far! currently using it for auth, storage, and real-time functionality in my next.js app. recently, i was poring through the CLI docs and noticed a few commands called
    supabase db branch [list|create|delete|switch]
    , but i couldn't find any more information on what this feature is. can anyone here point me in the right direction for some long-form docs on how database branching works? if this is what i think it is, it could be the Holy Grail of production/development data 😄
    n
    • 2
    • 1
  • c

    cyborg31

    07/26/2022, 3:12 PM
    hi everyone. Wasted lots of time to find the solution for this issue here when trying to login with email and supabase auth:
    You must provide either an email, phone number, a third-party provider or OpenID Connect.
    Can someone please point me into the right direction what I am doing wrong? I'm sending email and pw and have not found any setting I could change within supabase to solve this (using supabase cloud, not on-prem).
    n
    g
    • 3
    • 5
  • m

    Molimat

    07/26/2022, 3:27 PM
    Hi fellows! Are you experiencing random timeouts in some of your requests to Supabase?
    n
    • 2
    • 1
  • k

    knoppoly

    07/26/2022, 3:39 PM
    Can I make a blanket RLS Policy to restrict the public schema to only authenticated users?
    n
    g
    • 3
    • 26
  • a

    Audrow

    07/26/2022, 3:42 PM
    Hi all, how can I seed a database with users that I can login to and explore the app from their account? Currently, I have a
    seed.sql
    file in my supabase directory that gets run when I reset the database using the Supabase CLI (local development). That seed file does something like this:
    Copy code
    sql
    DO $$
    
      DECLARE user_1_id uuid;
      DECLARE user_2_id uuid;
    
      BEGIN
        user_1_id := uuid_generate_v4();
        user_2_id := uuid_generate_v4();
    
        INSERT INTO auth.users (id, email, created_at, updated_at)
          VALUES
            (user_1_id, 'audrow@hey.com', now(), now()),
            (user_2_id, 'not-audrow@hey.com', now(), now());
    
        -- use user_1_id and user_2_id in other tables
    $$;
    With this setup, I see the two users in my database, but I cannot login with them (I get a generic database error) and cannot email them a login link or reset their password. I think that I can probably do what I want with a JS script that uses my Supabase client, but don't know how to use a JS file to seed the database automatically each time I reset the database.
    n
    j
    • 3
    • 6
  • h

    Hoely

    07/26/2022, 4:16 PM
    Hello does supabase auth refresh_token expires?
    n
    g
    • 3
    • 6
  • l

    laznic

    07/26/2022, 4:54 PM
    Does anyone know if there would be any problems / challenges if I now implemented authentication via regular (non-Supabase) Discord auth, and then later wanted to switch to do the authentication via Supabase using Discord provider? Which things should I consider with this approach?
    n
    • 2
    • 4
  • h

    Hussein Kizz

    07/26/2022, 4:59 PM
    Hello guys, what do you think am doing wrong here that the console.log never logs and even the avatar url never gets filled into the db. I have tried on it the whole day, am not seeing what's wrong!!!
    n
    g
    d
    • 4
    • 7
  • d

    DevThoughts

    07/26/2022, 5:30 PM
    Is supabase production ready?
    n
    s
    • 3
    • 4
  • c

    caesarp

    07/26/2022, 5:52 PM
    Hi, currently the is the 'anon' and 'authenticated' (or something like that) roles in supabase.. is there a way to craete 'group' or 'teams' roles so we can have.. something like 'admins','visitor','editor' roles so those are the ones validated for certain CRUD policies? are those fields needed to be created in the users table or needs to be created in another new table and then joined/validated every api call? is there a way to embed into the JWT so we can validate on each call instead of making an extra call to validte the role of that user? thanks!
    n
    w
    +2
    • 5
    • 8
  • s

    stevharve

    07/26/2022, 6:30 PM
    Every time I try to invoke a function from my react app I get a cors error. I have already implemented the cors example.
    n
    g
    • 3
    • 37
  • k

    Ketch

    07/26/2022, 7:22 PM
    Hi folks, anyone have success in building the https://github.com/supabase/postgres image locally? Reason being that during development I'm encountering several bugs which have already been fixed in the GraphQL (pg_graphql) extension. I tried the Ansible playbook, but ran into missing Java runtime. Then tried through Docker with the fix in this PR https://github.com/supabase/postgres/pull/237, but faced a different while compiling one of the extensions. I was hoping to get some confirmation that things are currently in a working state before I spend more time in troubleshooting. Thanks and much appreciated! 🙏
    n
    j
    • 3
    • 5
1...307308309...316Latest