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

    Spinney

    02/08/2022, 8:38 PM
    Anyone have any suggestion on this error I'm getting with docker? None of the containers are able to access the database during
    docker-compose up
    even though
    supabase-db
    is successfully created and started.
    j
    s
    • 3
    • 10
  • s

    Scott P

    02/08/2022, 8:44 PM
    onAuthStateChange
  • s

    Scott P

    02/08/2022, 8:57 PM
    Docker issues
  • c

    cdbattags

    02/08/2022, 9:53 PM
    Hi everyone, is there any place for discussion surrounding deploying Supabase on Kubernetes? I see the repo is still empty on GitHub
  • c

    callum.m

    02/08/2022, 10:05 PM
    Is there a way to identify which free projects in all my orgs are created by me? It looks like you can only have 2 free projects now, and I'm not sure which projects are being counted against me because all remaining are in shared orgs. Also I deleted one project and am still getting the same error, so I assume I had 3+ but not sure how to see how many there are/which they are
  • j

    joshcowan25

    02/08/2022, 11:20 PM
    Need help - Syntax error at or near select
    g
    • 2
    • 5
  • y

    Yonben

    02/09/2022, 9:37 AM
    Hi everyone πŸ™‚ I'm working a small project with the League of Legends API, learning Supabase as well. I'd like some guidance with auth/Row Level Security. Basically when a player enter their name, it goes to the League API and retrieves the user data and I want to insert it. However when I try it tells me that
    new row violates row-level security policy for table "summoners"
    . I guess it means it requires auth to go through and get some grants that would allow the write?
  • m

    madx

    02/09/2022, 9:39 AM
    Have you defined any policies for that table? The studio provides a few canned policies that can be useful but by default there's no policy so basically you can't do anything with the table πŸ˜„
  • y

    Yonben

    02/09/2022, 9:40 AM
    No policies yet. But I'm still figuring out how to deal with the inserts at all. Technically the user shouldn't need to be authed to call the endpoint that will do the insert
  • y

    Yonben

    02/09/2022, 9:41 AM
    So I should remove the RLS entirely?
  • m

    madx

    02/09/2022, 9:41 AM
    Then you need to add a policy to allow non authenticated users to do the insert
  • y

    Yonben

    02/09/2022, 9:41 AM
    Ok thanks, will look into it!
  • m

    madx

    02/09/2022, 9:43 AM
    In the studio if you go to Authentication > Policies there's a bunch of templates that you can customize and take inspiration from to define your own policies
  • y

    Yonben

    02/09/2022, 9:43 AM
    Thanks a lot! πŸ™‚
  • c

    christianalares

    02/09/2022, 9:45 AM
    There is a concept with RLS that i don't really understand. What if I want everyone to be able to read. Fine, i'll just return true for SELECT. But if I want to restrict all inserts except for requests from my server maybe with a specific auth key or something, how will I do this? This has nothing to do with users och authenticated users, it's just that I want to make sure my server is the only one who can make inserts, not any other user from a rest-client or so. How do I achieve this? Thanks!
  • y

    Yonben

    02/09/2022, 9:50 AM
    Yeah that's definitely the way I feel right now
  • m

    madx

    02/09/2022, 9:54 AM
    If it's a request made on your server, just use a service key and it will bypass all RLS restrictions
  • y

    Yonben

    02/09/2022, 10:06 AM
    The key tagged
    service_role
    secret
    @User ?
  • m

    madx

    02/09/2022, 10:06 AM
    yep
  • m

    madx

    02/09/2022, 10:06 AM
    just make sure never to leak it to the front/client app
  • y

    Yonben

    02/09/2022, 10:06 AM
    Thanks πŸ™‚ And yeah ofc πŸ™‚ cc @User you might find that info helpful
  • y

    Yonben

    02/09/2022, 10:08 AM
    And thanks a lot @User for the info! πŸ™‚
  • c

    christianalares

    02/09/2022, 11:35 AM
    @User Oh of course, that makes sense! I guess need to create a separate supabaseClient instance for the server then? (I'm using Next JS with some code in a api endpoint)
  • y

    Yonben

    02/09/2022, 11:45 AM
    That's an interesting question indeed. I use Nest and created a wrapper that exposes specific function (
    selectPlayerByName
    ). Should I have 2 instances, one for
    regular
    use, and one for
    service
    use?
  • m

    matheusbn

    02/09/2022, 6:26 PM
    Can i create policies for functions? How can protect it if not?
    g
    • 2
    • 2
  • g

    garyaustin

    02/09/2022, 6:38 PM
    Function policies
  • y

    Yonben

    02/09/2022, 7:25 PM
    So hmmm... I broke my DB (had some errors with migrations and then was stupid enough to remove the
    schema_migrations
    table). It's still a dev version so I could reset the db completely. Is there to reset the remote db? I still have the proper migrations on my version control πŸ™‚
    s
    • 2
    • 9
  • s

    silentworks

    02/09/2022, 9:22 PM
    Reset database
  • e

    earld

    02/10/2022, 3:04 AM
    I am new to Supabase and seeing an error while attempting to use the SQL editor to run a command to define some new tables and relations: I can see the error but there is no line number associated with it. Is there a way to get this information?
    s
    • 2
    • 21
  • e

    earld

    02/10/2022, 3:53 AM
    And is export off Supabase officially supported?
1...217218219...316Latest