You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If you manually type /login, /signup, /recover-password in URL address while being authenticated you will be directed to these pages and stay on them without any redirect. this.props.isLoggedIn is undefined in this case in PublicRoute.js.
Same thing works if you click on "Reset Password" in the email let's say for the second time, you also land on /reset-password/token while being authenticated.
Is it because of local state, slow Redux or something else? In Meteor Pup it was easy cause userId was built-in and always there.
To Reproduce
Steps to reproduce the behavior:
Go to localhost:5000/documents
Type localhost:5000/login in URL
Expected behavior
Redirect to default authenticated page without loading 'Login' page UI
Desktop (please complete the following information):
OS: MacOS 11.4
Browser Chrome
Version 90.0.4430.212
The text was updated successfully, but these errors were encountered:
inkiltie
changed the title
Login/Signup/Recover accessible after authentication
Login/Signup/Recover/Reset accessible after authentication
Jun 4, 2021
Looks like application was making a bunch of wrong moves by not waiting for user object to return. This caused redirect malfunction for public pages and showing Login and Signup buttons in the navigation bar when you actually authorized.
Overall it's not a big issue when you are developing locally and user object returns within a fraction of a second, but on production server far away, this may cause annoying experience.
Describe the bug
If you manually type /login, /signup, /recover-password in URL address while being authenticated you will be directed to these pages and stay on them without any redirect.
this.props.isLoggedIn
isundefined
in this case in PublicRoute.js.Same thing works if you click on "Reset Password" in the email let's say for the second time, you also land on /reset-password/token while being authenticated.
Is it because of local state, slow Redux or something else? In Meteor Pup it was easy cause userId was built-in and always there.
To Reproduce
Steps to reproduce the behavior:
localhost:5000/documents
localhost:5000/login
in URLExpected behavior
Redirect to default authenticated page without loading 'Login' page UI
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: