Redirect to dashboard if you have an auth token and trying to access to signup, signin, forgot passoword o verify pages
Changes
It uses Navigation component instead of navigate inside a useEffect to redirect to signin page when trying to access on a SaasOrganizationProtectedRoute
It implements SaasAuthProtectedRoute to protect authentication routes if you have an auth token and redirect to dashboard so you can only logout.
Breaking: now signup and signin are inseide /account path
Added a logout button on account create screen as suggestion by @jpaulet
Motivation
Redirect to dashboard if you have an auth token and trying to access to signup, signin, forgot passoword o verify pages
Changes
Navigation
component instead ofnavigate
inside auseEffect
to redirect to signin page when trying to access on aSaasOrganizationProtectedRoute
SaasAuthProtectedRoute
to protect authentication routes if you have an auth token and redirect to dashboard so you can only logout./account
path