saasitive / django-react-boilerplate

DIY Django + React Boilerplate for starting your SaaS
https://saasitive.com
MIT License
596 stars 89 forks source link

Login available even authenticated #4

Open vialou opened 3 years ago

vialou commented 3 years ago

the login page should route to the dashboard or root if already authenticated.

pplonski commented 3 years ago

You are right! I will fix this in next post

Elabbasy00 commented 3 years ago

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 /