https://supabase.com/ logo
Join Discord
Powered by
# javascript
  • a

    a d

    07/29/2021, 3:30 PM
    is there a way to give params
  • m

    magicquin

    07/29/2021, 3:32 PM
    @User Wondering if you perhaps know,
  • s

    Scott P

    07/29/2021, 3:32 PM
    Yeah - when you call
    .rpc()
    , you pass it the function name and the parameters it needs - e.g.:
    Copy code
    js
    const { data, error } = await supabase
      .rpc('echo_city', [
        { name: 'The Shire' },
        { name: 'Mordor' }
      ])
    Source: https://supabase.io/docs/reference/javascript/rpc In terms of auth, maybe setting the
    authenticated
    role for the security of your function would suffice
  • s

    Scott P

    07/29/2021, 3:33 PM
    You're gonna need to expand with some specifics before I can tell you if I know
  • a

    a d

    07/29/2021, 3:33 PM
    omg thank you so much you're life saver
  • m

    magicquin

    07/29/2021, 3:34 PM
    The issue that I picked
  • a

    a d

    07/29/2021, 3:34 PM
    i need to read docs properly 😅
  • s

    Scott P

    07/29/2021, 3:34 PM
    There are several hundred people in this server, and lots of messages
  • m

    magicquin

    07/29/2021, 3:34 PM
    Do I need to specifically add and list
  • m

    magicquin

    07/29/2021, 3:35 PM
    My fronrend to the site url
  • s

    Scott P

    07/29/2021, 3:35 PM
    Add and list what? I can't help you unless I know what you're referring to
  • m

    magicquin

    07/29/2021, 3:35 PM
    the default is http://localhost:3000
  • m

    magicquin

    07/29/2021, 3:36 PM
    Since I wouldnt be connecting from my localhost
  • a

    a d

    07/29/2021, 3:37 PM
    one more doubt, what if i am using supabase createClient in frontend how should i hide the api key and stuffs or keep it safe ik this is really dumb question but idk how will i solve this
  • s

    Scott P

    07/29/2021, 3:38 PM
    The public/anon key doesn't need to be hidden, it's safe for it to be in your front-end. The service key has admin level access, and shouldn't be exposed anywhere that it could be stolen (e.g. use it ONLY in server backends)
  • m

    magicquin

    07/29/2021, 3:39 PM
    When spining up my docker with my web app, the DB gets created, however I keep getting browser time out
  • a

    a d

    07/29/2021, 3:41 PM
    umm, wait this is going to sound dumb but if i am making changes to database using public/anon keys so can someone not use it ? and spam or do whatever
  • s

    Scott P

    07/29/2021, 3:41 PM
    Try opening a github discussion with full details, I can't gather enough information from here to be able to look into it
  • m

    magicquin

    07/29/2021, 3:42 PM
    My bad, so I have build and ecommerce platform, when the docker starts up, all configurations, etc.. are kept within the database, So ift cant get to the db or is unable to read from the db
  • m

    magicquin

    07/29/2021, 3:42 PM
    Then it times, outr
  • m

    magicquin

    07/29/2021, 3:43 PM
    So i think my questions, is specific to, do i need to set my site url within the settings.
  • s

    Scott P

    07/29/2021, 3:43 PM
    That's a good point. In this situation, I can see 2 options: - Create a small server that calls the function with your service key, and create an endpoint that authed users can access (might require more investigation) - Look at restructuring your database Is there a specific reason you want 1 table for each user?
  • m

    magicquin

    07/29/2021, 3:43 PM
    Or does it not make a differnce
  • m

    magicquin

    07/29/2021, 3:45 PM
    Well all, its all interlinked, crm, logistics, sales, purcgases
  • s

    Scott P

    07/29/2021, 3:45 PM
    I was replying to someone else with that
  • m

    magicquin

    07/29/2021, 3:45 PM
    No problem
  • a

    a d

    07/29/2021, 3:47 PM
    isee thanks for clarification for last point -> it's bcs i m creating a note taking type of app where users can create acc and use create different section of notes public/private and i don't know how to structure db so i can keep all the notes with their proper dates and stuffs so im creating different table for different users so db is structure nosql is different from relational db so it's hard to think in terms of column based db as i m shifting from firebase
    s
    • 2
    • 15
  • a

    a d

    07/29/2021, 3:47 PM
    i don't know any better way
  • o

    Olyno

    07/29/2021, 9:20 PM
    Hi I'm trying to use the provider way to login. Problem: it looks like the ``client.auth.user()`` is not reactive? Like I need to refresh my page to get the data (see gif)
    h
    f
    • 3
    • 60
  • h

    hackerdocc

    07/30/2021, 2:50 PM
    hey, does someone know a possible reason for my realtime subscriptions to not be receiving changes? I passed the correct URL and API key, subscribed to all changes and made sure the supabase_realtime publication is on all tables. What else could it be?
1...456...81Latest