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

    Marco Pieterse

    03/07/2022, 8:55 AM
    Working with support to resolve it, will let you know if we can solve it
  • s

    silentworks

    03/07/2022, 9:04 AM
    Creating index
  • e

    elliott

    03/07/2022, 9:13 AM
    I've been stuck on something for a while, I think it's probably easy so if someone knows I would love help! I have Oauth set up with Supabase for Twitter. After that flow completes, I get back a session, which looks like this:
    Copy code
    access_token:'some token'
    expires_at:1646647623
    expires_in:3600
    provider_token:'some token'
    refresh_token:'some token'
    token_type:'bearer'
    Now I'm trying to set up my Twitter api, and I thought that "provider_token" from this Supabase Oauth session response would work for that, but it does not, Twitter gives me a 403 error if I use that token. I've tried "access_token" and "refresh_token" as well for what it's worth. Are none of these tokens twitter related? Does anyone know where the API auth token comes back from Oauth w/ Supabase? Thank you!
  • u

    ⛄joshi⛄

    03/07/2022, 9:54 AM
    @User I have the exact same issue, the dashboard works fine though, did support say anything?
  • m

    Marco Pieterse

    03/07/2022, 9:56 AM
    They are still investigating. It was a project that I restored after it was paused. Was this the case for you too?
  • u

    ⛄joshi⛄

    03/07/2022, 10:11 AM
    I don't think I've ever restored this project
  • u

    ⛄joshi⛄

    03/07/2022, 10:11 AM
    it has been working for 3 months
  • u

    ⛄joshi⛄

    03/07/2022, 10:12 AM
    until about 7 hours ago
  • u

    ⛄joshi⛄

    03/07/2022, 10:12 AM
    i'll add a support ticket just in case
  • e

    elliott

    03/07/2022, 10:51 AM
    Looks like it is a known issue https://github.com/supabase/supabase/discussions/2961
  • v

    v.naeimabadi

    03/07/2022, 10:56 AM
    .subscribe((status, e) => console.log(status, e)) i got: status= RETRYING_AFTER_TIMEOUT ,error= undefined and then status= SUBSCRIPTION_ERROR ,error= undefined
    g
    • 2
    • 1
  • k

    Kendy

    03/07/2022, 11:04 AM
    Hello, what are the best practices for working with production and local development?
  • b

    bangdragon

    03/07/2022, 12:25 PM
    After install supabase cli and start. I use refine framework (based on react). The http://localhost:54323/project/default/api loaded and nearly works fine. There is one thing. It show error: Error: [500] An error has occured: Failed to fetch.In this page there is no the settings icon. In react app when login i got error failed to fetch too. The url http://localhost:54321/ cannot loaded. Thanks. I already know the problems. Because my laptop is old, so it does not have SSE4.2 that is the Kong need
  • t

    TobiasLogix

    03/07/2022, 1:00 PM
    Hey! I'm using nextjs and supabase. Currently Im trying to make the sign in / sign up process more production ready. That's why I added hcaptcha to this process. Currently, Im using a custom register api route, which validates the captcha token to call the supabase sign up method afterwards. This works fine, but for now, it is possible to just call the supabase sign up method with the client to bypass the captcha. Is there any way to disable this functionality and only allow service key clients to register accounts? 🙂
  • g

    garyaustin

    03/07/2022, 2:06 PM
    Subscription error
  • w

    whoisYeshua

    03/07/2022, 2:57 PM
    Hi. How to delete all rows from table? when i try
    Copy code
    js
    await supabase.from('talbe_name').delete()
    i got error DELETE requires a WHERE clause
    s
    g
    • 3
    • 3
  • r

    ryfill

    03/07/2022, 3:09 PM
    Hi everyone! I'm new to supabase and trying to run it locally on my server via docker. I'm getting a CORS error trying to load the API page -
    Copy code
    Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://kong:8000/rest/v1
    It seems as though this is a known thing, I've found [this issue](https://github.com/supabase/supabase/issues/5540) on github outlining the same problem I'm having, but I cannot for the life of me figure out a fix. Anyone run into and fixed this before?
  • s

    Scott P

    03/07/2022, 3:10 PM
    Delete
  • a

    ak4zh

    03/07/2022, 4:10 PM
    Using the default INSERT to your table
    (role() = 'authenticated'::text)
    it seems people will be able to insert on behalf of others. It does not prevent:
    supabase.from('some_table').insert({'user_id': SOME_ONE_ELSES_ID, 'col': 'col-data'})
  • s

    Scott P

    03/07/2022, 4:12 PM
    That's why
    (uid()  = user_id)
    exists
  • a

    ak4zh

    03/07/2022, 4:13 PM
    Yes I mean may be it should be added in the default policy example, but after rethinking I understand now that not everyones table may have user_id column so the example makes sense. When I first started with supabase I just used the recommended example RLS and realised it's not that preventing above case.
  • p

    Pollie

    03/07/2022, 4:14 PM
    Can you do an OR-statement between 2 different tables? I would like to fetch all records where either a value on the same table equals a value or where a related table contains a value. For example:
    Copy code
    supabase
      .from('table')
      .select('*, related_table (*)')
      .or('field1.eq.value, related_table.field2.eq.value')
    I know there is a
    foreignTable
    option, however that'll also scope the first field into that table which is not what I want to achieve.
  • g

    garyaustin

    03/07/2022, 4:44 PM
    Postgrest itself requires all filter columns to be in the same table within the filter. So you can, as you noticed, use a foreign table, but it has to apply to all columns.
  • p

    Pollie

    03/07/2022, 4:46 PM
    Are there any other options to be able to do this?
    g
    • 2
    • 2
  • m

    marcelcruz

    03/07/2022, 4:54 PM
    hey everyone! is there a way to reset a schema (looking at
    auth
    , mainly) to its initial state?
    s
    • 2
    • 4
  • f

    Fatih G.

    03/07/2022, 5:35 PM
    Hi everyone, i have a question. async function getPost() { const { data, error } = await supabase .from('posts') .select(
    Copy code
    user_id (
            email
          )
    ) getPosts(data) console.log(data, error) } This code doesn't work Error message: {message: "Could not find a relationship between 'posts' and 'user_id' in the schema cache", hint: "Verify that 'posts' and 'user_id' exist in the sch…ship was created, try reloading the schema cache."}
    g
    • 2
    • 11
  • j

    JeyJey

    03/07/2022, 6:08 PM
    Is there a way in which I can listen to changes in the supabase postgres SQL database. Basically create my own version of function hooks? I want to call a serverless function or an endpoint that has a secure connection. This needs to be a server/backend of some sort and not a front end.
  • j

    justinjunodev

    03/07/2022, 6:18 PM
    Never mind my initial query. I resolved it doing the following. Now when a user signs up via GitHub it triggers this hook and will set insert the
    user_name
    from the
    raw_user_meta_data
    .
    Copy code
    begin
      insert into public.profile(id, meta, username)
      values(new.id, new.raw_user_meta_data, new.raw_user_meta_data->>'username');
    
      return new;
    end;
    🙌 🙌 🙌
  • j

    justinjunodev

    03/07/2022, 6:37 PM
    I appreciate the help and link. However, I'm not sure if this approach will work, as GitHub is my only authentication provider? So users are not signing up or submitting any additional field information.
  • f

    Fatih G.

    03/07/2022, 6:38 PM
    how can i remove function. I want update function
    s
    • 2
    • 5
1...239240241...316Latest