django-react-boilerplate
django-react-boilerplate copied to clipboard
Login available even authenticated
the login page should route to the dashboard or root if already authenticated.
You are right! I will fix this in next post
In case you want a solution now
There are two ways
1- add render prop to Route and redirect user to" / " if isAuth return True otherwise return Login component
-- cons
You will lose the ability to redirect User did not sign and try to access the dashboard login/?next="dashboard"
2 - just connect Login Page and check if isAuth false or true Accordingly, display the page or only pushed to /