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

    bim

    08/16/2021, 12:22 AM
    I believe you have to prefix environment variables you want exposed to the client with
    NEXT_PUBLIC_
    in next js
  • d

    Di

    08/16/2021, 2:10 AM
    Sorry I'm not sure I follow. Why is the username authenticator instead of postgres? If it's postgres, doesn't that mean it bypasses RLS? When you don't want that, actually?
  • l

    loooke

    08/16/2021, 2:45 AM
    Sorry if this is too vague/basic of a question, but how would I go about creating a privileged userin supabase? Would I need to update a user profiles table on auth with privilege levels?
  • g

    Gustavogsb

    08/16/2021, 3:59 AM
    Hello people. Maybe they have already answered my question before. But is there any way to have two supabase clients on NextJs without conflicts?
  • g

    Gustavogsb

    08/16/2021, 3:59 AM
    Doing here I have a 401 error when fetching some tables, I believe due to cookies.
  • s

    stibbs

    08/16/2021, 4:41 AM
    Has anyone tried the supabase-elixir package out? Thinking of trying that today (there's no guide sadly)
  • p

    Peanut

    08/16/2021, 6:34 AM
    Hey I am trying to use Function Hooks to POST to my Firebase function but whenever I edit a row I get this error:
    Copy code
    ERROR:  invalid input syntax for type bytea
    CONTEXT:  SQL statement "insert into net.http_request_queue(method, url, headers, body, timeout_milliseconds)
        values (
            'POST',
            net._encode_url_with_params_array(url, params_array),
            headers,
            body::text::bytea,
            timeout_milliseconds
        )
        returning id"
    PL/pgSQL function net.http_post(text,jsonb,jsonb,jsonb,integer) line 42 at SQL statement
    My query is simple:
    Copy code
    UPDATE assets SET description = 'Yes' WHERE title = 'Otto';
    How do I fix this?
  • a

    Adamo

    08/16/2021, 8:53 AM
    Yeah that is the solution, I managed to fix it earlier today. I should've left a note in this channel. Thanks!
  • y

    Yggdrasill

    08/16/2021, 9:15 AM
    Hi, the gotrue-js client library stores the session in localstorage. Why is this considered "safe"?
  • p

    Peanut

    08/16/2021, 1:17 PM
    It probably only stores the JWT token in session storage and the token can be read by anyone as it is encrypted
  • p

    Peanut

    08/16/2021, 1:17 PM
    (only the backend has the key which can decrypt it)
  • p

    Poypoypoy

    08/16/2021, 2:39 PM
    hi guys, why i reaceived 404 in this code?
  • a

    Adamo

    08/16/2021, 2:41 PM
    when you call
    Copy code
    typescript
    const { user, error } = await supabase.auth.signUp({ email, password });
    How would I go about attaching a username to the newly created user? I'm pretty confused about how the API works. I have a 'profiles' table that was created from the
    User Management
    starter, and I tried calling this after creating the user, which doesn't seem to work.
    Copy code
    typescript
    await supabase.from('profiles').update({ username }).eq('id', user?.id);
    s
    • 2
    • 22
  • p

    Poypoypoy

    08/16/2021, 2:42 PM
    how about update your user.meta
  • p

    Poypoypoy

    08/16/2021, 2:43 PM
    im not sure if this a good practice
  • a

    Adamo

    08/16/2021, 2:44 PM
    user.meta?
  • a

    Adamo

    08/16/2021, 2:45 PM
    what do you mean? What am I doing incorrectly?
  • p

    Poypoypoy

    08/16/2021, 2:49 PM
    like this one
  • p

    Poypoypoy

    08/16/2021, 2:50 PM
    are you working with profile ?
  • a

    Adamo

    08/16/2021, 2:51 PM
    Yes I have a profiles table.
  • a

    Adamo

    08/16/2021, 2:52 PM
    I just wanted to be able to attach more information to a new user on signup because I want them to set a username/avatar etc
  • p

    Poypoypoy

    08/16/2021, 2:58 PM
    yeah were almost the same
  • u

    user

    08/16/2021, 2:59 PM
    Hello. I am new to using supabase. I was wondering if there was a way to connect to the database via vanilla JavaScript and the connection string or do I have to use a back-end framework?
  • o

    omidh

    08/16/2021, 3:38 PM
    Hey, Yes you can use vanilla JavaScript, too!
  • v

    Vinzent

    08/16/2021, 4:45 PM
    Which postgresql user should I use when I want to connect to the database via a third party application? Just
    postgres
    ?
  • m

    Marky

    08/16/2021, 4:54 PM
    Is there a way to update rows based on current value. So instead of querying current value, you can say quantity + 10 for an update? I know Postgres supports it natively, does the API have a way of doing it?
    m
    n
    • 3
    • 3
  • j

    jjj.westra

    08/16/2021, 5:11 PM
    I guess you can always make a stored procedure
  • j

    jjj.westra

    08/16/2021, 5:11 PM
    and then call the rpc through the api
  • m

    Marky

    08/16/2021, 5:18 PM
    Is that the only way to do it? It is possible using Postgres natively.
  • j

    jjj.westra

    08/16/2021, 5:35 PM
    i think that is the only way; otherwise you would need typescript to retrieve the row field, adjust it and then update it
1...525354...316Latest