-
Notifications
You must be signed in to change notification settings - Fork 86
Before Route Enter authentication on Login route #532
Description
At present, as before any route enters we are first verifying our authentication and then we allow the user to enter that route after authentication.
For the Login route, the user is allowed in both the situation:
1) When User Wants to Login
2) When the User is already Logged In and has an authentication token in the store.
So, I think for the second case when a user has a valid authentication token then he/she should be redirected to the dashboard rather than that of the login route and allow to visit the login route only when it log out first.
This issue can be easily solved by updating some logic before each route enters inside the index.js file in the router folder.
I know this is not such a big issue for the present version, but just for the improvement of our tool, we can do this.
If you find it useful then I can work on it.