https://supabase.com/ logo
Join Discord
Powered by
# off-topic
  • u

    0xhjohnson

    08/03/2021, 1:52 PM
    SelectEnum type in supabase
  • j

    Jasper

    08/03/2021, 1:59 PM
    Copy code
    jsx
     login: () => supabase.auth.signIn({provider: "google"}),
  • j

    Jasper

    08/03/2021, 1:59 PM
    Copy code
    jsx
        const [user, setUser] = useState();
        const [loading, setLoading] = useState(true)
    
        useEffect(() => {
            const session = supabase.auth.session();
            setUser(session?.user ?? null)
            setLoading(false)
    
            const {data: listener} = supabase.auth.onAuthStateChange(async (event, s) => {
                setUser(s?.user ?? null)
                setLoading(false)
            })
    
            return () => {
                listener?.unsubscribe()
            }
    
        }, [])
  • j

    Jasper

    08/03/2021, 1:59 PM
    Is in the same component, it's listening for the onAuthStateCHange
  • c

    carlomigueldy.eth

    08/03/2021, 2:03 PM
    I see this is on React. But I dev on Flutter web
  • j

    Jasper

    08/03/2021, 2:04 PM
    Hm
  • c

    carlomigueldy.eth

    08/03/2021, 2:04 PM
    But it worked just now, but I got another problem
  • c

    carlomigueldy.eth

    08/03/2021, 2:04 PM
    When I redirect back to my web app in Flutter, I am not able to retrieve the query params... Lol
  • c

    carlomigueldy.eth

    08/03/2021, 2:04 PM
    But I am close
  • j

    Jasper

    08/03/2021, 2:04 PM
    I'm not a fan of flutter, Iv'e tried it before but had many issues
  • c

    carlomigueldy.eth

    08/03/2021, 2:05 PM
    True
  • c

    carlomigueldy.eth

    08/03/2021, 2:05 PM
    I'm kind of regretting my tech choice for this Hackathon lmao
  • j

    Jasper

    08/03/2021, 2:05 PM
    I kinda like react native using Expo
  • c

    carlomigueldy.eth

    08/03/2021, 2:05 PM
    I see that's cool, I only tried React Native a few times
  • t

    turtlebasket

    08/03/2021, 2:30 PM
    It's pretty easy to learn
  • t

    turtlebasket

    08/03/2021, 2:31 PM
    Just understand the important concepts like state and hooks and such
  • d

    donpuerto

    08/03/2021, 2:31 PM
    What do you mean for "alter table public.users enable row level security"?
  • y

    YelloJello

    08/03/2021, 3:12 PM
    idk where to send this to tbh, but say i disable email verification to avoid a registration process from failing until the email is verified then how do i send them that verification email later? feels like a big loophole imo
  • f

    fenix

    08/03/2021, 4:02 PM
    The
    type
    field makes me wonder if there are other possible values other than
    sms
    . Is there any reference/swagger documentation about it?
  • f

    fenix

    08/03/2021, 4:04 PM
    Just to understand if I can hardcode that field for my library, or create a list of possible values for it
  • y

    YelloJello

    08/03/2021, 4:04 PM
    is this the auth metadata object? i haven't played around with mobile auth yet. also the docs are pretty limited rn, types and code are a lot more useful
  • f

    fenix

    08/03/2021, 4:10 PM
    this is the payload for the otp verification endpoint. From the article (https://supabase.io/blog/2021/07/28/supabase-auth-passwordless-sms-login) it looks like it can be omitted, but in the dashboard of the APIs it is added in the payload. The documentation still doesn't mention this endpoint as I am aware of. So generally for developing my library I refer to the official js one or just their swagger files. But in their source code it isn't mentioned either (https://github.com/supabase/gotrue-js/blob/797ea09b6188291861b5bed4a488cc74b6f95aaf/src/GoTrueClient.ts#L222)
  • y

    YelloJello

    08/03/2021, 4:48 PM
    by dashboard of the apis, are you referring to dashboard -> api? I don't see the type property either. tbh it doesn't make any sense to have a type prop, the only other way you'd send an otp is via email but the shape of the function would be different for such a use case right
  • f

    fenix

    08/03/2021, 4:56 PM
    Yes, I'm referring to dashboard -> API. To see that you have to open the "bash" view, since by default it shows the "Javascript" one
  • f

    fenix

    08/03/2021, 5:50 PM
    Actually it could have sense to me. It is just a restful api which asks to supabase to send a one time password, I guess generated by twilio. Specifying the type field could let you decide where you actually want to get that otp. With
    sms
    you are telling that you want to receive the otp on the same number you have specified, which should be an obvious choice... still, if the field accepted a
    email
    value you could receive the otp in a mail. I suppose that's why that field is still noted somewhere, but the thing that it is omitted in some Supabase pages is a little missleading to me.
  • t

    Togert

    08/03/2021, 6:45 PM
    can I use Supabase in Production?
  • t

    Togert

    08/03/2021, 6:45 PM
    for an app
  • t

    Togert

    08/03/2021, 6:45 PM
    so are the servers stable?
  • h

    HarryET

    08/03/2021, 6:48 PM
    @User it could in theory be useed in production afaik
  • t

    Togert

    08/03/2021, 6:49 PM
    Okay, because I'm scared that it wont work flawlessly bc supabase says its in beta
1...626364...392Latest