The login redirect mechanism in DNN should ensure that the entire originally requested url is used when redirecting the user to log in and return. I have links using client-side routing (i.e. that include parameters after #) that do not survive this process.
Link that was clicked on:
https://mysite.com/fr-fr/Material/moduleId/665/CompanyId/17/controller/Products/action/Index#/p/25102
Redirects to
https://mysite.com/fr-fr/Login?returnurl=%2ffr-fr%2fMaterial%2fmoduleId%2f665%2fCompanyId%2f17%2fcontroller%2fProducts%2faction%2fIndex#/p/25102
And then
http://mysite.com/fr-fr/Material/moduleId/665/CompanyId/17/controller/Products/action/Index#/
Note the missing p/25102 at the end of the last url.
We should have the full url. I suspect we should also have the encoding of the forward slashes in the redirecturl correct. That may even be the root cause.
All
I looked into this a bit as well, it looks like we need to properly encode the URL hash, as the /, as is, is a valid character
For Reference: https://stackoverflow.com/questions/2849756/list-of-valid-characters-for-the-fragment-identifier-in-an-url
Right. From my research we go through HttpUtility.UrlEncode, but running this in isolation it works as expected. So we are doing something here that changes the url before the encoding or something.
Most helpful comment
I looked into this a bit as well, it looks like we need to properly encode the URL hash, as the /, as is, is a valid character
For Reference: https://stackoverflow.com/questions/2849756/list-of-valid-characters-for-the-fragment-identifier-in-an-url