Issues with Login Conditional Using Supabase and React
I'm encountering an issue with a login component in a React project using Supabase for authentication. The login flow seems to function, but I'm having trouble with a specific conditional that's supposed to redirect the user to the dashboard after successful login.
Here's the relevant code snippet:
The issue arises with the conditional if (data && session && session.access_token). After "successfully" logging in with Google, I am unexpectedly redirected first to the '/dashboard' and then immediately to the home page, instead of staying on the dashboard. This behavior seems inconsistent with the intended functionality of the conditional statement.
I set up a redirect in Supabase but it didn't work.
Here's the relevant code snippet:
The issue arises with the conditional if (data && session && session.access_token). After "successfully" logging in with Google, I am unexpectedly redirected first to the '/dashboard' and then immediately to the home page, instead of staying on the dashboard. This behavior seems inconsistent with the intended functionality of the conditional statement.
I set up a redirect in Supabase but it didn't work.
