0xhjohnson
08/03/2021, 1:52 PMJasper
08/03/2021, 1:59 PMjsx
login: () => supabase.auth.signIn({provider: "google"}),
Jasper
08/03/2021, 1:59 PMjsx
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()
}
}, [])
Jasper
08/03/2021, 1:59 PMcarlomigueldy.eth
08/03/2021, 2:03 PMJasper
08/03/2021, 2:04 PMcarlomigueldy.eth
08/03/2021, 2:04 PMcarlomigueldy.eth
08/03/2021, 2:04 PMcarlomigueldy.eth
08/03/2021, 2:04 PMJasper
08/03/2021, 2:04 PMcarlomigueldy.eth
08/03/2021, 2:05 PMcarlomigueldy.eth
08/03/2021, 2:05 PMJasper
08/03/2021, 2:05 PMcarlomigueldy.eth
08/03/2021, 2:05 PMturtlebasket
08/03/2021, 2:30 PMturtlebasket
08/03/2021, 2:31 PMdonpuerto
08/03/2021, 2:31 PMYelloJello
08/03/2021, 3:12 PMfenix
08/03/2021, 4:02 PMtype
field makes me wonder if there are other possible values other than sms
. Is there any reference/swagger documentation about it?fenix
08/03/2021, 4:04 PMYelloJello
08/03/2021, 4:04 PMfenix
08/03/2021, 4:10 PMYelloJello
08/03/2021, 4:48 PMfenix
08/03/2021, 4:56 PMfenix
08/03/2021, 5:50 PMsms
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.Togert
08/03/2021, 6:45 PMTogert
08/03/2021, 6:45 PMTogert
08/03/2021, 6:45 PMHarryET
08/03/2021, 6:48 PMTogert
08/03/2021, 6:49 PM