django-react-boilerplate icon indicating copy to clipboard operation
django-react-boilerplate copied to clipboard

Login available even authenticated

Open vialou opened this issue 5 years ago • 2 comments

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

vialou avatar Feb 11 '21 09:02 vialou

You are right! I will fix this in next post

pplonski avatar Feb 11 '21 09:02 pplonski

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 /

Elabbasy00 avatar Feb 13 '21 03:02 Elabbasy00