Default Redirect URL after AEM Login | Community
Skip to main content
Level 3
October 19, 2023
Solved

Default Redirect URL after AEM Login

  • October 19, 2023
  • 4 replies
  • 2838 views

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

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

EstebanBustamante
Community Advisor and Adobe Champion
EstebanBustamanteCommunity Advisor and Adobe ChampionAccepted solution
Community Advisor and Adobe Champion
October 19, 2023
Saravanan_Dharmaraj
Community Advisor
Community Advisor
October 19, 2023

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

Level 3
October 21, 2023

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 

kapil_rajoria
Community Advisor
Community Advisor
October 20, 2023

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.

kautuk_sahni
Community Manager
Community Manager
October 26, 2023

@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