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

    Jasper

    08/02/2021, 8:09 PM
    The app renders the todos fine
  • w

    wmd

    08/02/2021, 9:24 PM
    tables are crashing and not loading at all - all requests fail
  • w

    wmd

    08/02/2021, 9:24 PM
    load times are super slow
  • w

    wmd

    08/02/2021, 9:25 PM
    Copy code
    Error loading tables
    TypeError: cannot parse response
  • k

    KrisCoulson

    08/02/2021, 9:51 PM
    Does anyone know if there is a good way to test storage implementation locally? Currently to test that everything is working proper I have to use a separate hosted project to make sure the files are being uploaded correctly. I know its in a beta but just curious. I run everything else out of the docker container.
    b
    e
    s
    • 4
    • 16
  • w

    w14n

    08/02/2021, 9:52 PM
    Hello, I made a custom schema named "private". When I try to access this schema (using react to-do list example) I get the error
    Copy code
    javascript
    "The schema must be one of the following: public, storage"
    I added the new schema to
    Extra search path
    I also tried running all of those commands:
    Copy code
    sql
    create schema private AUTHORIZATION postgres;
    grant usage on schema private to postgres, anon, authenticated, service_role;
    grant create on schema private to postgres, anon, authenticated, service_role;
    All of this doesn't work 😕 Can someone tell me what I'm missing to access my custom schema?
    b
    • 2
    • 8
  • u

    user

    08/02/2021, 9:59 PM
    Will there ever be native support for usernames in the auth module?
  • u

    user

    08/02/2021, 9:59 PM
    Because implementing it with a profile table is a lot more difficult
  • s

    ShaneTheKing

    08/02/2021, 10:37 PM
    When you use 3rd party auth, is there a way to change the redirect URL to your own instead of your supabase URL?
  • s

    Scott P

    08/02/2021, 10:41 PM
    You'd have to self-host for that. Essentially, it has to route back to Supabase to activate the user and validate the token is legitimately from the oAuth provider, and then it forwards the response when it redirects back to your endpoint/website.
  • s

    ShaneTheKing

    08/02/2021, 10:42 PM
    Gotcha, that's what I figured but wasn't 100% sure, thanks 🙂
  • s

    Sucipto

    08/02/2021, 11:56 PM
    You can use
    auth.update()
    method:
    Copy code
    js
    const { user, error } = await supabase.auth.update({ 
      data: { username: 'supabase' } 
    })
    and it will be available on
    auth.user()
    as
    user_metadata.username
  • b

    burggraf

    08/03/2021, 12:17 AM
    Storage in local development
  • b

    burggraf

    08/03/2021, 12:20 AM
    Accessing Custom Schema
  • r

    Rakuen

    08/03/2021, 1:31 AM
    need help. I'm using NextJS with supabase. currently i setup the JWT Expiry to 5 sec (for testing purpose). when it expires or offline and i navigate to a page where requires to fetch table data (using
    .select
    ), it doesn't refresh the token and gave 401 status instead. how do i refresh the token before start fetch (CRUD) stuff? it works if reload browser but If possible I don't want it that way
  • d

    DharmaraJ

    08/03/2021, 6:26 AM
    Is there any way to add a new column in table without deleting existing rows?
  • k

    Khan W

    08/03/2021, 6:52 AM
    Yes, be default adding a column won’t delete current rows as long as those rows fit into the new scheme. Make sure that the column you’re adding can accept
    null
    values
  • d

    DharmaraJ

    08/03/2021, 6:53 AM
    Thanks, I had not allowed null values. Maybe that's why I had issues
  • k

    Khan W

    08/03/2021, 6:55 AM
    For sure! If you were doing it with raw sql there’s a way to fill in the values on existing rows using a function, if you need to do that Google is your friend :))
  • d

    DharmaraJ

    08/03/2021, 6:56 AM
    Yes, new to SQL so I still don't know all reliable/easy-to-understand sources on SQL 😅
  • d

    DharmaraJ

    08/03/2021, 6:56 AM
    like MDN for JS
  • k

    Khan W

    08/03/2021, 6:56 AM
    Ah for sure, I still don’t get most SQL I find
  • d

    DharmaraJ

    08/03/2021, 7:06 AM
    I have this policy enabled. Users can requests URLs for their images only then right?
  • d

    DharmaraJ

    08/03/2021, 7:06 AM
    Copy code
    userId > {fileName}
  • c

    carlomigueldy.eth

    08/03/2021, 7:40 AM
    It's weird that a user cannot INSERT a new record if it does not satisfy my SELECT policy! I don't know what went wrong, need someone to check it out if you've been working with policies a lot
    Copy code
    sql
    ALTER TABLE conversations ENABLE ROW LEVEL SECURITY;
    
    DROP POLICY IF EXISTS "Allow read access only to involved participants" ON public.conversations;
    
    CREATE POLICY "Allow read access only to involved participants" 
    ON public.conversations 
    FOR SELECT USING ( 
      auth.uid() IN (
        SELECT user_id 
        FROM conversation_participants 
        WHERE conversation_id = id
      ) 
    );
    
    DROP POLICY IF EXISTS "Allow create access to conversations" ON public.conversations;
    
    CREATE POLICY "Allow create access to conversations"
    ON public.conversations
    FOR INSERT WITH CHECK ( true );
    
    DROP POLICY IF EXISTS "Allow update access to conversations" ON public.conversations;
    
    CREATE POLICY "Allow update access to conversations"
    ON public.conversations
    FOR UPDATE WITH CHECK ( true );
    
    DROP POLICY IF EXISTS "Allow delete access to conversations" ON public.conversations;
    
    CREATE POLICY "Allow delete access to conversations"
    ON public.conversations
    FOR DELETE USING ( true );
    s
    • 2
    • 10
  • d

    DharmaraJ

    08/03/2021, 7:41 AM
    camelcasing is not allowed in column names ?
  • d

    DharmaraJ

    08/03/2021, 7:53 AM
    Copy code
    sql
    SELECT * 
    FROM comments
    WHERE post_id IN (
      SELECT post_id FROM posts WHERE user_id = '1234'
    )
    s
    • 2
    • 29
  • d

    DharmaraJ

    08/03/2021, 7:53 AM
    How do I run this query using JS SDK ?
  • d

    DharmaraJ

    08/03/2021, 7:53 AM
    Copy code
    js
    supabase.from("comments").select('*')
  • d

    DharmaraJ

    08/03/2021, 7:53 AM
    Kind of stuck here
1...333435...316Latest