tdwcks
09/27/2021, 12:14 PMsilentworks
09/27/2021, 12:29 PMMiguel2390d
09/27/2021, 2:25 PMMiguel2390d
09/27/2021, 2:25 PMThomas B
09/27/2021, 2:49 PMMiguel2390d
09/27/2021, 3:12 PMMiguel2390d
09/27/2021, 3:12 PMMDobs
09/27/2021, 3:29 PMScott P
09/27/2021, 3:41 PMjon.m
09/28/2021, 1:13 AMjon.m
09/28/2021, 1:14 AMfp
09/28/2021, 4:31 AMfp
09/28/2021, 4:31 AMmikebarkmin
09/28/2021, 9:01 AMbokolesnik
09/28/2021, 9:35 AMmikebarkmin
09/28/2021, 9:36 AMbokolesnik
09/28/2021, 9:57 AMbokolesnik
09/28/2021, 9:58 AMsilentworks
09/28/2021, 10:30 AMAxel
09/28/2021, 1:59 PMgaryaustin
09/28/2021, 2:25 PMsilentworks
09/28/2021, 2:35 PMjon.m
09/28/2021, 2:49 PMJanR
09/28/2021, 2:51 PMjaded
09/28/2021, 3:05 PMsilentworks
09/28/2021, 3:27 PMJanR
09/28/2021, 3:30 PMJanR
09/28/2021, 4:12 PMJanR
09/28/2021, 4:24 PMo_lebres
09/28/2021, 4:55 PMPrivateRoute
, and I'm using React Context API for listening authentication events (supabase.onAuthStateChanged(event, session)
). So, I'm facing some issues with properly redirect the user.
The invite URL has the ``/`` path ("http://localhost:3000"), and I'm redirecting ``/`` to ``/home`` with the latter being a PrivateRoute. And the PrivateRoute behaves this way: ``if(user){ return } else { return }``. But for some reason (almost certainly my fault), it's not working properly because the user is logged in, but he keeps on the login page. I think that the listener has some sort of delay, and there's no user on the PrivateRoute, so the user sees the login page, and only after that is logged in.
I tried to explain my problem as best as I can, and I know it's a bit confusing, but I appreciate your help.
Thank you!