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
If a logged out user tries to access a restricted page, such as the post-creation page, they will instead be directed to the login page. When this happens we want to keep track of the page the user attempted to access, and direct them there automatically after they successfully log in.
For example
Logged out user tries to navigate to /p to create a post
They're instead taken to /login
The user logs in
They're automatically taken to /p
The text was updated successfully, but these errors were encountered:
Did you envision this being resolved by adding middleware or do you want to add the checks directly into the protected hoc routes (forget the exact name of the component)?
Did you envision this being resolved by adding middleware or do you want to add the checks directly into the protected hoc routes (forget the exact name of the component)?
I believe we can add the referred path as a query parameter to the login page URL via the restricted page component.
If a logged out user tries to access a restricted page, such as the post-creation page, they will instead be directed to the login page. When this happens we want to keep track of the page the user attempted to access, and direct them there automatically after they successfully log in.
For example
/p
to create a post/login
/p
The text was updated successfully, but these errors were encountered: