cancel
Showing results for 
Search instead for 
Did you mean: 

redirection after successful login

neha_gupta03
Explorer
0 Kudos
617

Hi,

After successful login the page is always redirecting to the home Page "/" however I have changed the defaultTargetUrl of StorefrontAuthenticationSuccessHandler even then it is redirecting to homePage rather than to the custom controller. Could anyone please help in how to redirect to the custom controller url after successful login.

Former Member
0 Kudos

Can you please tell how you changed the default url? After login I want to land on product listing page

Thanks, Sanket

former_member1010236
Participant
0 Kudos

In my case it is redirected to /mypage/de/my-account Can someone please give hints where these changes are made?

Accepted Solutions (0)

Answers (2)

Answers (2)

bhavirisetty
Active Participant
0 Kudos

Hi,

Could you please provide your configuration, But however we can change the configuration spring-security-config.xml, by default for responsive UI channel it will redirect to '/' ,

Thanks

El-jaoujat
Active Participant
0 Kudos

Hello,

you should also override the value of alwaysUseDefaultTargetUrlForDesktop and eventually alwaysUseDefaultTargetUrlForMobile to false.

in your bean definition add the following lines

 <property name="alwaysUseDefaultTargetUrlForMobile" value="false"/>
 <property name="alwaysUseDefaultTargetUrlForDesktop" value="false"/>

Youssef,