[Bug]: Redirect After Login Only Enforced With No ReturnUrl
Is there an existing issue for this?
- [X] I have searched the existing issues
What happened?
If a portal has a "Redirect After Login" set within the settings, the redirect to that page is ONLY occurring if the user does not have a "ReturnUrl" in the querystring/cookies OR if the redirect URL is the homepage.
By default the Login UserControl adds a return URL for ANY page, which results in this behavior only working when you login fro the homepage, OR if you don't use the built in user control that automatically adds the parameter.
Steps to reproduce?
Before you test, set a unique page to your site as the Redirect after Login.
Failure Path
- VIsit any sub page of the site, not logged in
- Click Login
- Login
- Notice you are directed BACK to the page that you started on in item 1.
Success Path
- Visit the homepage
- Click Login
- Login
- Notice you are directed to the configured page.
Current Behavior
You only are redirected to the redirect after login IF you didn't have a redirectUrl when trying to login
Expected Behavior
Expectation "Redirect After Login" - Should ALWAYS redirect to this page after login. Expectation/benefit would be to FORWARD the RedirectUrl as a parameter to this destination.
Relevant log output
No response
Anything else?
No response
Affected Versions
9.12.0 (latest release), 10.0.0 (alpha)
What browsers are you seeing the problem on?
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
@dnnsoftware/approvers Thoughts on this?
Certainly an issue we've run into. However, it will be a major change for folks relying on that behavior. Do we need to add a setting?
Maybe that is the way to handle it.
Something like Redirect Mode
- Always Pass ReturnUrl
- Always Do-Not Pass ReturnUrl
- Only when no ReturnUrl provided
That would solve our challenge! Having a separate Site Behavior setting ("Redirect Mode") in addition to the Redirect After Login setting allows for full flexibility.
I agree on a settings approach here.