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

    DanMossa

    04/12/2022, 1:56 PM
    I'm unable to use openID due to there being a bug. I created a PR 2 weeks ago. How can I get this looked at? https://github.com/supabase/gotrue/pull/430
    n
    s
    • 3
    • 6
  • s

    supa okezie

    04/12/2022, 6:09 PM
    I had a
    polls
    table with some columns in my database. After some time, I added a
    number_of_votes_received
    column that defaults to 0 and is updated by a trigger to the
    polls
    table. When I make a GraphQL query where this column is included, it works well. However, when I try to get the value of
    number_of_votes_received
    in the GraphQL query, it returns an error "Unknown field 'number_of_votes_received' on type 'polls'." I have checked over and over again and I am certain that there is a
    number_of_votes_received
    column. Do you know anything that may have caused this behaviour?
    n
    c
    • 3
    • 5
  • d

    DeadlyDev

    04/12/2022, 7:12 PM
    Any suggestions on getting relationship data back from a real time event? For example I am listening for new messages and messages has an author relationship. Not sure how to go about getting that author data through real time.
    n
    g
    • 3
    • 3
  • s

    sambor

    04/12/2022, 8:56 PM
    Hi Guys! 👋 I need your help with the real-time database feature. I'm trying to make it work and I did every step suggested by the documentation and it is not working as intended. According to the supabase dashboard, it seems like it works because I've got some Realtime Connection Requests, but I'm not getting any events from DB in the app. Steps that I took so far: 1. I enabled replications for the tables I want to subscribe. 2. Wrote logic for getting changes from the todos table:
    Copy code
    useEffect(() => {
        const todosSubscription = supabase
          .from('todos')
          .on('*', payload => console.log(payload))
          .subscribe()
    
        return () => {
          supabase.removeSubscription(todosSubscription)
        }
      }, [])
    n
    g
    r
    • 4
    • 28
  • n

    Needle

    04/12/2022, 9:55 PM
    Hello @Richie! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
  • i

    Invader

    04/12/2022, 9:57 PM
    during my login process I'm only using supabase.auth.setAuth(token); from a jwt token endpoint response but this isn't firing off an supabase.auth.onAuthStateChange event How can I refactor this to get it to work properly?
    n
    g
    • 3
    • 38
  • g

    Guaco

    04/12/2022, 10:51 PM
    Hi ya'll, we have a file uploader feature that will use Supabase's Storage. Is there some levels of security to prevent people from uploading files like pdfs that may contain a virus?
    n
    i
    • 3
    • 3
  • t

    timeforpoptarts

    04/13/2022, 12:48 AM
    I am scratching my head - doing something incorrect with a policy. My intent here is that a user can only see/modify resources that they are member of. This doesn't work. What am I doing wrong?
    Copy code
    create policy resource_users_manage on public.resources
      for all using (public.resources.id in (select resource_id from public.resource_users where auth.uid() = user_id))
      with check (public.resources.id in (select resource_id from public.resource_users where auth.uid() = user_id));
    n
    g
    • 3
    • 9
  • a

    Ape R Us

    04/13/2022, 7:04 AM
    hey, im trying to fetch data based on the auth.user.id via svelte endpoint but im getting a little trouble on how i should call. the 'event' table has coloum named "user_id" that is linked to the auth.user.id table
    Copy code
    import supabase from '$lib/db';
    
    export const get = async () => {
        try {
            const { data: events, error } = await supabase
                .from('event')
                .select('*')
                .eq('user_id', auth.users.id));
    
            if (error) throw error;
    
            return {
                body: {
                    events
                }
            };
        } catch (e) {
            console.log({ e });
        }
    };
    n
    t
    • 3
    • 6
  • p

    pocin

    04/13/2022, 9:09 AM
    Dangerous default security on views
    n
    s
    • 3
    • 7
  • s

    stjepan

    04/13/2022, 12:05 PM
    Hi, I'm using the free Supabase tier, and I noticed that sometimes (seems random), some queries can take longer to resolve (sometimes up to 10-15 seconds). It's not a specific query; sometimes it is a data mutation query, sometimes it is a fetch data query. After refresh same query resolves in less than second ( ~400ms is average). Not sure why this is happening, maybe because it is a free tier? I'm 1000 km away from the server where Supabase is hosted (Frankfurt) . Can that be the cause of these spikes?
    n
    s
    • 3
    • 4
  • u

    usamichizuru

    04/13/2022, 3:40 PM
    Insert data into existing array using API
    • 1
    • 1
  • a

    anon_123

    04/13/2022, 3:55 PM
    I would like to add a Notes feature to my project. I want these to be encrypted so that not even I as the admin of the DB can read them. Is this possible with supabase? And if so, how would that work? Is the key the password? What if a user looses their password?
    n
    s
    v
    • 4
    • 6
  • r

    robin

    04/13/2022, 7:55 PM
    Hi all, I have a sign-up/in flow with 3rd-party providers 99% working in my app 🙂 I need help with the last %! After you get redirected from the provider back to the app,
    app.supabase.auth.user()
    still returns the cached
    null
    user, and the app thinks you haven't signed in. If you reload, everything works fine. What's the best way to fix this?
    n
    g
    • 3
    • 6
  • j

    justinjunodev

    04/13/2022, 9:46 PM
    Is is possible to automate jobs in Supabase? For example: Every hour I'd like to check table rows for a boolean field. If that field is marked true, delete that row?
    n
    g
    • 3
    • 4
  • d

    dreinon

    04/13/2022, 10:59 PM
    Hey! Someone that can help me set up Supabase Auth with Google in my Appsmith app? 😀
    n
    g
    • 3
    • 11
  • l

    lrnecgcysiam

    04/14/2022, 2:25 AM
    I have a slight issue looking for the section to add my auth bearer token. I have been able to use the stripe API key as it has been instructed but now there is an issue where I need to provide the Authorization bearer token within my application I am using the ngrok to use the function hook to get the stripe customer id locally so my guess is to add it in the http header because this call should be handled server side.
    n
    • 2
    • 4
  • o

    oiojin831

    04/14/2022, 3:56 AM
    have you ever tried this? I am currently trying this but not sure how to upload file directly to local bucket
    n
    • 2
    • 1
  • o

    oiojin831

    04/14/2022, 3:57 AM
    question about the development flow it
  • m

    Muezz

    04/14/2022, 4:43 AM
    If I start using
    Stored Procedures
    for all possible queries in my app and stop using designated querying methods, would it matter? Especially in terms of time to load the data.
    n
    g
    • 3
    • 4
  • a

    akito

    04/14/2022, 5:02 AM
    What's the easiest way to store time within a table? I'm currently storing a
    Date
    from TypeScript which gets converted to a
    timestamp
    , but when I select from the table it gets returned as a
    string
    of what I'm assuming is a timestamp. Is there any native support for automatically converting those types back to
    Date
    , or should I use a
    number
    instead?
    n
    • 2
    • 2
  • o

    oiojin831

    04/14/2022, 7:59 AM
    Is this normal to have
    Copy code
    new row violates row-level security policy for table "buckets"
    this error message, when I try to create bucket from "local development"? should I setup something? Could anyone give me some instruction how to use storage in local development? It seems like it doesn't have studio ui Thank you
    n
    g
    • 3
    • 4
  • u

    usamichizuru

    04/14/2022, 10:37 AM
    Is there any way to push data into array in a existing column on Supbabase? Sorry if this is a fundamental question.
    n
    g
    • 3
    • 4
  • e

    eoin

    04/14/2022, 10:44 AM
    👋 Hi there! I'm having a hard time setting up a simple "only auth users can insert" RLS policy on a table. I've followed these docs [0] and tried both a "all can select" policy as well as passing
    returning: minimal
    on the insert call, but I still get blocked by RLS (code
    42501
    ). The user has
    role: authenticated
    and
    aud: authenticated
    when I log it to the console, so I'm having a hard time figuring out where the disconnect is. 🤔 Any and all help is appreciated! 🙏 [0] https://supabase.com/docs/reference/javascript/insert#notes
    n
    • 2
    • 6
  • n

    Needle

    04/14/2022, 12:30 PM
    Hello @NARCISO! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
    • 1
    • 2
  • n

    Needle

    04/14/2022, 12:35 PM
    Hello @NARCISO! This thread has been automatically created from your message in #843999948717555735 a ``few seconds ago``. Pinging @User so that they see this as well! Want to unsubscribe from this thread? Right-click the thread in Discord (or use the ... menu) and select Leave Thread to unsubscribe from future updates. Want to change the title? Use the
    /title
    command! We have solved your problem? Click the button below to archive it.
    • 1
    • 3
  • j

    jar

    04/14/2022, 1:56 PM
    if i call
    Copy code
    create or replace function test() returns void as $$
      declare
        new_username text;
      begin
        new_username = generate_available_username();
        insert into public.profiles(belongs_to_person_id, username)
        values('9395c81d-ff88-421e-9d8a-5a31675d4418', new_username);
      end;
    $$ language plpgsql
    
    select test()
    it adds a profile with a username fine. But if i use a function which Id like to do sign up fails. Does my trigger version look correct? Are there rules in triggers Im not aware of?
    Copy code
    declare
      new_username text;
    begin
      new_username = generate_available_username();
      insert into public.profiles(belongs_to_person_id, username)
      values(new.id, new_username);
      return new;
    end;
    I have a trigger that creates a person on user sign up and on person signup create profile. Do they prevent too many strung together tasks or something? Although without including usename it woks fine
    n
    s
    g
    • 4
    • 44
  • d

    Daniel for ze revolucija69

    04/14/2022, 3:17 PM
    While im trying to deploy to supabase a function, i always get this error. Locally its running fine
    n
    g
    • 3
    • 6
  • d

    DesertRodent

    04/14/2022, 3:34 PM
    Hi Supabase team! I have a questions with regards to the email links generated and deeplinking into a React Native App. We are trying to integrate Supabase with Branch.io and we have noticed that links that are generated are based on this rough schema [URL]#param=go&hear=instead The fact that the params for tokens (magic link) etc are placed after a # makes them not readable by branch.io) To what extent can these links be adjusted and configured?
    n
    g
    • 3
    • 3
  • k

    Koen

    04/14/2022, 4:15 PM
    Hi a question for scenario where I would like to build something simple with Supabase. I would like to use the full supabase for auth/storage/db but just host my html on an amazon S3 so no server or so
    n
    g
    • 3
    • 5
1...257258259...316Latest