Closed jeffsikes closed 6 years ago
After a bit of investigation, I found this really difficult to fix from my side and am going to suggest you handle it on yours.
Why this happens
Craft takes over before I can do much about this due to us using the the loginPath
general configuration. Since we are using that Craft sees that you are already login and doesn't want to take you back there, to the login page.
How to handle this Correct me if I'm wrong but I was thinking you could do something like this:
{% if currentUser %}
<a href="{{ destination }}">Destination</a>
{% else %}
<a href="{{ myLoginPath }}?RelayState={{ destination }}">Destination</a>
{% endif %}
This may be a "working as intended" item, but there is a scenario where the RelayState variable does not return you to the expected page.
Scenario: