Example:
- User is not logged in
- User has items in their shopping cart
- User goes to /checkout
- User is redirected to the /login page
- User logs in successfully and should be redirected back to the /checkout page
How does the login action know to redirect the user to checkout in this case? I want this to work in many different situations not just /checkout.
Best Answer
Would a query string parameter in the login page be enough?
eg: www.example.com/Login.php?returnUrl=[someUrl]
After the authentication is successful, the user would get redirected to the url specified in the query string.
...
Edit: This is a general solution, it many not be an option given the framework you are using. But something to consider.