If a user is not logged in and is seeing a public perspective, then he can login from that page, and after having logged, should be redirected to that page.
Use localStorage to save the current path (doc/:id) and then when on the root path, if the value is there, delete it and redirect to it.
If a user is not logged in and is seeing a public perspective, then he can login from that page, and after having logged, should be redirected to that page.
Use localStorage to save the current path (doc/:id) and then when on the root path, if the value is there, delete it and redirect to it.