Some advice on the best way to do this - redirect on login based on link clicked

Need some advice on the best and simplest way to implement this for my app.

  1. I have an app which sends out an email.

  2. That email contains a link to a particular page and some parameters to display as certain record from the database - so it may look like this: https://app.example.com/dashbaord?ID=265858n474n4hj

  3. On click of the link if the user is not logged in it will take them to the login page where they log in first.

  4. Once they login they are redirected the url specified above.

The bit I am unsure off is if I the security manager directs them to login and they login how do I cache the link they clicked so they are then redirected to the specified url?

Let me know if the process or question is not clear!

Thank you!

Community Page
Last updated: