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

    Nick

    01/06/2022, 3:39 PM
    how can I differentiate that case from the case where a new user object was created, but the email confirmation step has not yet taken place?
  • n

    Nick

    01/06/2022, 3:40 PM
    i.e., on the user interface, how do I present the user with: "That email is already taken, did you mean to sign in?" versus "We sent you a confirmation link, go click it"
  • g

    garyaustin

    01/06/2022, 3:48 PM
    Here is one discussion I've seen on this (mainly the later part) https://github.com/supabase/supabase/discussions/1282 Note once a question goes much beyond a single reply "they" really want us to use threads, especially if reply is not to last post.
  • t

    trobo

    01/06/2022, 3:53 PM
    i was feeling super lost with this too when i tried working with it yesterday, thanks so much for linking that thread! 🙏
  • y

    yongelee

    01/06/2022, 5:08 PM
    how do you make AND statements? like supabase.from().select().eq().eq()?
  • y

    yongelee

    01/06/2022, 5:08 PM
    like eq("Id", id).eq("owner_id", owner_id)? does that work?
  • b

    bent

    01/06/2022, 5:29 PM
    I want to build a small game where players can just join via an invite link into a lobby. I don't want them to have to set up an account. (and I don't really want to store anything on the users besides their username and game stats) Now I'm thinking of just generating a random string for email address and password client side (without showing the user). I could then store username and the password in cleartext in localstorage, so that the user could be logged in next time automatically - but I'm having hesitations as this sounds like obviously a bad idea - and would storing the credentials even be necessary anyways?
  • f

    Frogwizard

    01/06/2022, 5:40 PM
    Hey, in the FAQs on the pricing page it is written that one can have 4 free projects (2 orgs with 2 projects). I have 1 org with 1 project and want to create another but get this error "Failed to create new project: You have reached the limit for the number of free projects you can create" Same happens when I create a second org. Is this a bug or did they change the free project limit?
  • n

    Nick

    01/06/2022, 5:42 PM
    Heyo, how do I write this using the supabase-js client?
    Copy code
    select k.key, u.*
    from api_keys as k
    join Users u on u.id = k.user_id;
  • m

    Mike_

    01/06/2022, 6:08 PM
    That works, or you can combine them into a single .match() filter See: https://supabase.com/docs/reference/javascript/match
  • n

    n0a

    01/06/2022, 6:12 PM
    Heya! Coming from working mainly with MongoDB, so pretty new to Postgres and the whole ecosystem. Just wondering if I have a table with a foreign key, can i populate that column? For example, when i get an article, can i the populate the author (which is an ID of a user) with the user information like name etc?
  • j

    jensen

    01/06/2022, 6:13 PM
    Hmmm that is interesting, I have 2 orgs with 3 projects each. So I maxed out at 6. Ive had to selfhost a few projects since
  • m

    Mike_

    01/06/2022, 6:54 PM
    Haven't tried this myself yet, but I think this may be what you're looking for: https://supabase.com/docs/reference/javascript/select#query-foreign-tables
  • n

    Nick

    01/06/2022, 7:03 PM
    I'm trying to work my way through that same guide, I don't really understand how the documented syntax maps to standard sql join syntax
  • t

    thien

    01/06/2022, 7:04 PM
    how do you guys manage users with supabase auth?
  • n

    Nick

    01/06/2022, 7:14 PM
    how do you select a user from the users table?
    Copy code
    const userRes = await supabase
            .from('users')
            .select();
    Trying to write a little auth middleware which maps a token -> user. I've tried
    users
    ,
    auth.users
    , etc, it seems there is no table for it. "relation "public.auth.users" does not exist"
    g
    m
    • 3
    • 25
  • j

    jonny

    01/06/2022, 8:13 PM
    https://supabase.com/docs/guides/auth/managing-user-data
  • t

    thien

    01/06/2022, 8:20 PM
    ty! i’m new to auth and triggers. let’s say i want to set a trigger where if a new github user signs up. it will update their profile with their github username and avatar_url. so the user doesn’t have to set it. ty for help.
    j
    • 2
    • 6
  • n

    n0a

    01/06/2022, 8:49 PM
    Thanks mate!
  • j

    jonny

    01/06/2022, 9:23 PM
    triggers
  • p

    pedrodiaz

    01/06/2022, 10:15 PM
    Does supabase creates index automatically for every foreign key?
  • p

    pedrodiaz

    01/06/2022, 10:16 PM
    Or do I have to explicity do it?
  • g

    garyaustin

    01/06/2022, 11:06 PM
    You need to create any indexes you need or want.
  • p

    pedrodiaz

    01/06/2022, 11:06 PM
    k thanks
  • k

    kresimirgalic

    01/06/2022, 11:23 PM
    Hey guys, i am trying to delete things that are related to some reference. For example I have post and that post have comments, if I as an owner delete that post from my profile, I want to delete all comments which are related to that post id. Is there any solution for it? I researched and found something like cascade deleting or something like that. I am not the expert in sql. 🙂
    j
    • 2
    • 2
  • l

    larryM

    01/07/2022, 3:14 AM
    are there any examples projects/docs of using the Function Hook Triggers? Im interested and seeing how the payload looks since we're using AWS Lamdas. Also, if anyone has done this before, id love to chat!
  • j

    jason-lynx

    01/07/2022, 6:50 AM
    on delete cascade
  • z

    Zenon

    01/07/2022, 9:10 AM
    Hello, I'm getting this error in Supabase Storage and I'm not able to create a bucket
    Copy code
    column buckets.public does not exist
    k
    • 2
    • 12
  • k

    kresimirgalic

    01/07/2022, 12:24 PM
    Hey everyone, I have question regarding the policies, first case is that i want to have one superadmin who can do all operations, how can I achieve that?
    j
    • 2
    • 1
  • k

    kresimirgalic

    01/07/2022, 12:26 PM
    When i am creating a new user, do i need to add something like role: 'superadmin' or i need to update user_metadatain auth.user()
1...186187188...316Latest