on 2018 Jun 12 11:51 PM
When I go to /my-account without being authenticated, I'm taken to the login form and then, automatically, to /my-account after I login. However, a new page I have (let's just say it is /my-page) does not have the same effect. When I go to /my-page without being authenticated, I am taken to the login page and then, automatically to /shop-home (the default redirect URL) instead of /my-page.
Does anyone know how to enable a redirect similar to /my-account but for /my-page?
Request clarification before answering.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i am not sure which reciepe you are using. i created b2b storefront. i see below code. here you have to modifiy the action which you want to call after successful authentication.
This code can be found in storefront/web/webroot/web-inf/config/spring-security-config.xml
<bean id="loginAuthenticationSuccessHandler" class="de.hybris.platform.acceleratorstorefrontcommons.security.StorefrontAuthenticationSuccessHandler" >
<property name="customerFacade" ref="customerFacade" />
<property name="defaultTargetUrl" value="#{'responsive' == '${commerceservices.default.desktop.ui.experience}' ? '/' : '/my-account'}"/>
<property name="useReferer" value="true"/>
<property name="requestCache" ref="httpSessionRequestCache" />
<property name="uiExperienceService" ref="uiExperienceService"/>
<property name="cartFacade" ref="cartFacade"/>
<property name="cartRestorationStrategy" ref="cartRestorationStrategy"/>
<property name="forceDefaultTargetForUiExperienceLevel">
<map key-type="de.hybris.platform.commerceservices.enums.UiExperienceLevel" value-type="java.lang.Boolean">
<entry key="DESKTOP" value="false"/>
<entry key="MOBILE" value="false"/>
</map>
</property>
<property name="bruteForceAttackCounter" ref="bruteForceAttackCounter" />
<property name="restrictedPages">
<list>
<value>/login</value>
</list>
</property>
<property name="listRedirectUrlsForceDefaultTarget">
<list></list>
</property>
</bean>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.