I'm having trouble with post-login redirection using React Router.
Say the user attempts to navigate to http://website.com/app/profile/2 but is redirected to http://website.com/login because their session expired. The endpoint /app exists within a PrivateRoute.
After login, I'd like the user to be directed to http://website.com/app/profile/2, but instead, they currently only redirected to /app.
How can I utilize the original destination for redirect after a successful login?
Thanks for your time!