I am working on a site that allows system user login. And I face some scenario below:
- User A will be redirected to https://www.example.com/login if they haven't logged in.
- In a normal case, if login successful, all user will be redirected to https://www.example.com/home by default.
If let say User A clicked on an email link (https://www.example.com/user/1), User A will be redirected to the login page if haven't login or User A will be redirected to the email clicked URL if User A already logged in. The question here is that how to redirect User A to the email clicked URL right after login successful instead of https://www.example.com/home by default.
Correct me if I'm wrong.