Redirect user if authenticated?
Is there a way to do a server-side redirect if the user is authenticated?
i.e: if a user is logged in, I do not want them to be able to go to the
I'm aware I can do this with a client-side check on the
Is there a way to configure some
i.e: if a user is logged in, I do not want them to be able to go to the
/login page, and should instead be redirected back to their /dashboard .I'm aware I can do this with a client-side check on the
useAuth() object, but that would still enable a single render of the "gated" content before redirecting (i.e if using a useEffect()).Is there a way to configure some
whenAuthenticated guard in the main.wasp?