Problem Summary
What we are trying to solve is we want to send a link that will redirect to a doctype for ex. http://localhost:8000/login?redirect-to=/Purchase%20Invoice/PINV-00006 this link should redirect the user to the doctype purchase invoice, but will ask for password first. So far what we failed to do is it should not ask the user to log in if the user is already logged in. But changing the link to http://localhost:8000/desk?redirect-to=/Purchase%20Invoice/PINV-00006 it will directly go to the invoice, the problem is if the user is not logged in,it will not redirect the user even after logging in.
Steps to Reproduce the Problem
- get a direct link ex. http://localhost:8000/login?redirect-to=/Purchase%20Invoice/PINV-00006, it should be http://localhost:8000/login and not http://localhost:8000/desk
- go to the link
- it will go to the invoice or any doctype