Expand my Community achievements bar.

SOLVED

Default Redirect URL after AEM Login

Avatar

Level 4

Hi,

I am looking to set a default redirect url, irrespective of redirect uri or resource which aem redirects automatically incase session is not active.

So, no matter from where the user is coming to login page, it should always go to a specific page post loggin in

 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
5 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Community Advisor

@ashish_mishra1 Are you talking about the SAML Authentication for the end users? 

we are using okta as SSO provider now, when the redirect is coming to aem, it has referrer property, we are trying to ignore referrer value , as it can be manipulated.

@EstebanBustamante @Saravanan_Dharmaraj @kapil_rajoria 

Avatar

Level 6

Hi, To meet the specified requirement you can use the Filter interface. Make a class that implements the Filter interface. In that class, override the doFilter() method and write the logic there. Generally, after successful login we store a token in the cookies and its availability and data in it is used to make sure a user has logged in. You can play with this token and page URLs to redirect the user to a certain page. For the redirection, you can use sendRedirect() method. The speciality of filter is that it is always called when a page loads.

Avatar

Administrator

@ashish_mishra1  Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni