RE: Redirect to Intended Private Page After Login in Liferay DXP

Jamie Sammons, modified 10 Months ago. New Member Post: 1 Join Date: 11/8/24 Recent Posts

I have developed a custom public login and registration page on the Liferay 7.4  2024.Q3.5 DXP platform. The following workflow is currently in place:

  1. Accessing a Private Page: When a user attempts to access a private page without being logged in, they are correctly redirected to the custom public login page.
  2. Post-Login Redirection Issue: After successfully logging in, instead of being redirected back to the originally requested private page, the user is taken to the Home page.

Expected Behavior: After logging in, the user should be redirected to the specific private page they initially tried to access, ensuring a seamless user experience.

What configuration changes or code adjustments are necessary in Liferay DXP to ensure that after logging in, users are redirected to the private page they originally attempted to access instead of the Home page?

thumbnail
Russell Bohl, modified 10 Months ago. Expert Posts: 308 Join Date: 2/13/13 Recent Posts

This is probably caused by the same logic that redirects you after timeout to the login page, then always straight to the home page after successful login. It used to be that you could log in and still be in the page/application. I don't know of configuration that can change this. If I recall it's a security decision to lose this convenience, and I'm not aware of configuration to change the behavior. Perhaps you could create a feature request. To do that just make a forum post in the General > Feature Requests category.